New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible memory leak on impressions tracking #803
Comments
@leeeomaaax - my company is seeing similar behavior. We even went so far as to set up split synchronizer to alleviate some of the pressure, but unfortunately did not resolve the issue. Would love to hear from Split team if there is something worth fixing. |
hey @radiantstatic , we've opened a support ticket with the Split team and they suggested disabling the impressionsMode. sync: {
impressionsMode: 'NONE',
}, |
Hi @leeeomaaax, From some performance tests running tens of millions of However, given the range of memory usage displayed in the screenshots (53 MiB ~ 293 MiB), it might be related to the internal cache used by the This cache, which is used to deduplicate impressions, has a maximum size limit of 500,000 items. A The cache is a Least Recently Used (LRU) cache, based on a Map and linked list data structures. Each item consists of a 32-byte string and a number (8 bytes). Considering the overhead from data structure references and other variables, it is reasonable to assume that the cache could reach one hundred to a few hundred MBs, though we don't have exact numbers. We will include some comments about this in our public documentation for future reference. |
Thank you for following up on this @EmilianoSanchez! |
Yes. That makes sense @leeeomaaax . I cannot 100% guarantee there is not a memory leak, but it's probably related to that cache. Using the Chrome dev tools, it seems that the LRUCache size plus its Nodes are around 144.7 MBs when it is full (the Retained size column in the screenshot, which is in bytes). |
lib version: 10.25.2 (but this was also happening on version 10.23.1)
node version: 18
--
The text was updated successfully, but these errors were encountered: