New timer app

Sean Hinde <>
Thu Apr 20 21:56:08 CEST 2000


Ulf,

> Sean>I recently posted a little application derived from the
> Sean>standard timer module in Kernel which uses an ordered_set
> Sean>mnesia table with a couple of indeces to give something
> Sean>which is more scalable.

> I must have dozed off for a while -- I didn't realize what you'd 
> done until now.
> I've attached our sysTimer module for your perusal.

I have perused, and see that the erlang:start_timer BIF is a good thing.

I'm not so sure about spawning a process for every apply_after though. I
have an application in mind which might have 100000 timers running, and
having a new process for each one is likely to be a pretty large overhead.
In more normal applications I'm not that sure which would be best. It
dependes on the source of inefficiency in the standard timer.

If your finding was that adding to the end of a sorted list was the problem
then mine sorts this out. If it was in the extra overhead of message passing
to a gen_server then fair enough.. ?

BR,
Sean 



More information about the erlang-questions mailing list