Skip to content

Fix #139, Improved performance by removing memory leak caused by high…#163

Closed
nelsonomuto wants to merge 1 commit intoNarrativeScience-old:masterfrom
nelsonomuto:memoryleakfix
Closed

Fix #139, Improved performance by removing memory leak caused by high…#163
nelsonomuto wants to merge 1 commit intoNarrativeScience-old:masterfrom
nelsonomuto:memoryleakfix

Conversation

@nelsonomuto
Copy link
Copy Markdown

Something that I noticed works quite well and improves performance is changing the client message_cap to a lower number. For example I changed it to 1 and it really boosted performance, the difference was night and day.
Even at 200,000 messages there is no lag at all when the message_cap variable is reduced to 1!
As opposed to before with the previous cap at 5000 the page started crawling at ~ 20,000 messages and browser freezing at ~ 70,000 messages.

I analyzed the code and I don't see any use for having a larger message_cap, at least not in the current tag v0.3.4. My assumption is this is left over from a legacy feature. Otherwise, keeping the LogMessages backbone collection as small as possible tremendously improved the usability.

client.coffee line 26 v0.3.4
MESSAGE_CAP = 1

@msmathers
Copy link
Copy Markdown
Collaborator

Thanks for this, v0.4.3 is a full rewrite and thus won't exhibit this exact issue.

@msmathers msmathers closed this Jan 10, 2020
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