_MD_GetInterval() on Mac calls Microseconds()
and Microseconds is known to have some performance and accuracy problems:
We should use UpTime() instead.
Simon, please advise on when this bug needs to be fixed.
I collected some data on this, and have a patch.
Using the current Microseconds call, which is a 68k call, the average time spent
in _MD_GetInterval() is 8.48ms. Changing that to use UpTime() and
AbsoluteToNanoseconds() reduces the average time in this call to 2.83ms.
I actually think we should change the NSPR timing implementation (PR_IntervalNow,
PR_MillisecondsToInterval and friends) to use more of the Multiprocessing and
Driver Services APIs under the hood, since these provide efficient absolute time
and time interval APIs.
Created attachment 25405 [details] [diff] [review]
Patch to replace Microseconds() call by UpTime()
Created attachment 25406 [details] [diff] [review]
Patched with fixed spacing
Those times I gave above are of course microseconds, not milliseconds
I tried this patch and kept landing in macsbug (dsFSErr) and had to reboot my
Mac. I'm running OS 9.1. I did try running other TCP/IP apps before mozilla but
I still couldn't get past the profile picker dismissal.
brade: did you try just this patch, or this and the MP Task one? I'd be surprised
if just this one caused dsFSErrs.
sorry; my previous comment was intended for the other bug... I'll copy it over.
I haven't seen any errors attributable to this patch yet.
Assigned the bug to Steve.
Any progress on this improvement ? It might seems something very small to a non-
Mac developer, but I can assure you that it makes a huge difference. I used the
same trick in my driver for an ADSL modem (not yet announced, so don't ask me for
What is the status of this bug (besides "sdagley is on sabbatical"); can we check
it in or is it insufficient or ?
Fixing this would make a very minor performance difference (probably below the
what is the current status on this? Is this something that is still an issue?
(trying to help focus)
Would I be remembering wrong, if I said that, I remembered reading next
releases of Mozilla wouldn´t be supported pre 9.0? I guess my next question
would be, are older versions of Mozilla supported still?
No longer relevant since we don't care about CFM.