#1372 mod_pep: Inefficient subscription handling

Reporter Zash
Owner Zash
Stars ★ (1)
  • Status-Fixed
  • Milestone-0.11
  • Performance
  • Priority-Medium
  • Patch
  • Type-Defect
  1. Zash on

    What steps will reproduce the problem? 1. Use mod_pep (+ variant in 0.11+) 2. Have a few PEP nodes 3. Receive presence from contacts What is the expected output? Should be fast and efficient. What do you see instead? Lots of storage requests, very slow. What version of the product are you using? 0.11.x Please provide any additional information below. When receiving presence from contacts, mod_pep updates their subscriptions based on caps / disco#info. Each time it adds or removes a subscription, the node configuration is saved (but presence based subscriptions are filtered out), so generally the existing data is simply replaced with identical data. In summary: O(n) storage accesses for no reason.

  2. Zash on

    Have a patch

    • owner Zash
    • tags Patch
  3. Zash on

    Fixed in https://hg.prosody.im/timber/rev/045209b41b3a Please test

    • tags Milestone-0.11 Status-Fixed
  4. Zash on

    Reverted in https://hg.prosody.im/trunk/rev/6714578cfd6e due to a regression.

    • tags Status-Accepted
  5. Zash on

    Attempt number two in https://hg.prosody.im/trunk/rev/225fade2ab4d

    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.