derbyjs / racer

Realtime model synchronization engine for Node.js
1.19k stars 118 forks source link

Cleanup data.splits #100

Closed SLaks closed 11 years ago

SLaks commented 11 years ago

I handled the model cleanup event to empty the splits cache.

This fixes #72.

lefnire commented 11 years ago

Holy crap! I'm gonna test this on Habit today, this may be the holy grail!

SLaks commented 11 years ago

This alone will not solve server memory leaks.

Leaking models will consume far more memory than only data.splits;you should really try to remove the leak entirely.

Also, this will only do anything when those models emit a cleanup event, which by default only happens every 128 event handler registrations.

lefnire commented 11 years ago

I see. I thought the leaky model was only a result of data.splits build up, I got ahead of myself :)

SLaks commented 11 years ago

data.splits is a big (in memory consumption) part of a model, but the rest of the model (the actual data, the query descriptors, etc) is even bigger.

SLaks commented 11 years ago

This was removed by https://github.com/codeparty/racer/commit/920784f249df6c39f3daff51af37764c765f0a0d