[PR #163] [CLOSED] Fix #139, Improved performance by removing memory leak caused by high… #253

Closed
opened 2026-02-26 05:31:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NarrativeScience-old/log.io/pull/163
Author: @nelsonomuto
Created: 9/2/2015
Status: Closed

Base: masterHead: memoryleakfix


📝 Commits (1)

  • 7bda260 Fix #139, Improved performance by removing memory leak caused by high message cap

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/client.coffee (+2 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NarrativeScience-old/log.io/pull/163 **Author:** [@nelsonomuto](https://github.com/nelsonomuto) **Created:** 9/2/2015 **Status:** ❌ Closed **Base:** `master` ← **Head:** `memoryleakfix` --- ### 📝 Commits (1) - [`7bda260`](https://github.com/NarrativeScience-old/log.io/commit/7bda260a02e884b848dcfe291842e045ac967e8f) Fix #139, Improved performance by removing memory leak caused by high message cap ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/client.coffee` (+2 -1) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 05:31:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/log.io-NarrativeScience-old#253
No description provided.