New timer app
Tue Apr 25 09:20:42 CEST 2000
On Thu, 20 Apr 2000, Sean Hinde wrote:
>> 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.. ?
It was really a combination of the two.
If your application requires that many timers, you may indeed have to
invent something new, as you have done.
Ulf Wiger, Chief Designer AXD 301 <ulf.wiger@REDACTED>
Ericsson Telecom AB tfn: +46 8 719 81 95
Varuvägen 9, Älvsjö mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden fax: +46 8 719 43 44
More information about the erlang-questions