19.01.2014, 19:56, "Scott González" <[email protected]>:
On Sun, Jan 19, 2014 at 10:40 AM, Alex Kocharin <[email protected]> wrote:

One timer per object is simpler, one global timer is faster.
 
Faster as in less overhead. But you also need to consider total time spent blocking other tasks, garbage collection, etc. The best thing to do is actually test how your application handles the scenario. You may need to process the objects in chunks depending on how processor intensive the checks are
Garbage collection doesn't matter, because the same number of objects gets freed anyway. Total time spent blocking other tasks with 1 timer is less then total time spent with 10000 timers, unless the code is very wrong.
 
So I mean "faster" as in "always faster" if you create an appropriate data structure to store objects.
 

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to