Skip to content

Conversation

Copy link

Copilot AI commented Dec 20, 2025

Addressed review feedback on PR #27 regarding HCXClient instantiation efficiency. The concern was that creating a new HCXClient() instance on every call might be inefficient.

Resolution

No code changes required. HCXClient already implements the singleton pattern via __new__:

class HCXClient:
    """HCX API 공용 클라이언트 (싱글톤)"""
    
    _instance = None
    
    def __new__(cls, *args, **kwargs):
        if not cls._instance:
            cls._instance = super().__new__(cls)
            # ... initialization
        return cls._instance

Calling HCXClient() in description_generator.py always returns the same instance, making the current implementation efficient.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix feedback on HCXClient singleton implementation Clarify HCXClient singleton pattern - no changes needed Dec 20, 2025
Copilot AI requested a review from 9keyyyy December 20, 2025 09:54
@9keyyyy 9keyyyy closed this Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants