Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2290

Use a common HashTable for global APM and log subscribers

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The initial implementation of LogSubscriber in PHPC-2180 maintains a separate global HashTable for registered loggers. This dates back to the original prototype, which used separate add/removeLogger functions, but was retained after modifying the existing add/removeSubscriber methods to handle loggers.

      Logging is technically more performant this way since it does not need to filter objects in a HashTable (as is done in phongo_apm_get_subscribers_to_notify); however, that may not be worth the code duplication and additional maintenance. Logging is also not a critical code path.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: