Skip to content
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

Performance & Memory Optimisations #529

Closed
balupton opened this issue Jun 20, 2013 · 3 comments
Closed

Performance & Memory Optimisations #529

balupton opened this issue Jun 20, 2013 · 3 comments

Comments

@balupton
Copy link
Member

Memory

Issues

Notes

Performance

Issues

Notes

  • performance improves with native streams over readable-stream inside caterpillar (until we drop 0.8 support, tough)

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@pflannery
Copy link
Contributor

Have been looking at docpad heap snapshots for the past day or so and found something I wanted to share with others.

In some circumstances coffee-script will instantiate your classes as "ctor" instead of the actual defined class name. (see here for more jashkenas/coffeescript#3236)

I have a very large docpad instance where there is around 16mb across 4644 ctor classes.
The problem with the ctor class is that it can actual refer to many different classes.

Here is a sample of class names in docpad heaps that like to lead a second life called "ctor"

Docpad
Task
TaskGroup
QueryCollection
EventSystem
...many more

To determine the real class behind the ctor class you can look at the ctor.constructor or the ctor.proto.constructor

So as a heads up when looking at a docpad heap snapshot make sure you also visit the ctor class. This will contain some very import class instances.

disclaimer: i'm not suggesting that ctor is introducing memory leaks. All I know is that it introduces confusion in the heap.

@pflannery
Copy link
Contributor

Another discovery I made today is that the current release of chrome has an issue when trying to compare nodejs heap snapshots. Fortunately it's working in Chrome Canary

Really useful when comparing your docpad changes ;)

@balupton
Copy link
Member Author

balupton commented Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants