You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the processors are actually run multiple times in a row for very similar sets of values, since requests/events from the same (or similar) user are happening close to each other. Some examples:
GeoIP lookups
Robot/Machine detection
Any DB-dependent processors
To optimize these processors, simple functools.lru_cache decorators can be added to heavy-duty functions (this might require some function calls/signatures refactoring). On top of that, a Redis-based LRU cache can be used in order to share/persist the cache between different processes/workers/nodes.
The text was updated successfully, but these errors were encountered:
Some of the processors are actually run multiple times in a row for very similar sets of values, since requests/events from the same (or similar) user are happening close to each other. Some examples:
To optimize these processors, simple
functools.lru_cache
decorators can be added to heavy-duty functions (this might require some function calls/signatures refactoring). On top of that, a Redis-based LRU cache can be used in order to share/persist the cache between different processes/workers/nodes.The text was updated successfully, but these errors were encountered: