Closed Bug 46737 Opened 26 years ago Closed 25 years ago

NSReg buffering still causes too many reads

Categories

(Core :: XPCOM, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dougt, Assigned: kandrot)

References

Details

(Keywords: embed, perf, Whiteboard: [nsbeta3-])

There are currently 252 fread calls made to read in the registry (32k requests!). The buffering in nsreg is being seeked over causing multiple file reads. I am sure that this is hurting the mac more than windows/unix. When I increased the buffer size to 1MB, much bigger than the registry file, I reduced startup time. We need to optimize this buffering - or remove it all together and read the entire file in. Current Buffer Size 64k - clean disk cache 18633 milliseconds - repeat 9776 milliseconds 1mb buffer - 10079 milliseconds - 9817 milliseconds Another optimizaton would be to remove this binary registry in favor of a tab-delimited file. I think that there is another bug on this though.
Keywords: embed, perf
I agree with all these sentiments. The buffer size increase I will probably put a rather high priority on. At least nsbeta3.
Status: NEW → ASSIGNED
Target Milestone: --- → M18
Keywords: nsbeta3
Whiteboard: nsbeta3+
Whiteboard: nsbeta3+ → [nsbeta3+]
Can you state WHERE you increased the buffer size? This appears to be a simple value change, but I haven't found where it is yet.
I will wait for a fix on 47378. Otherwise, increasing the buffer size without closing the file will greatly increase the memory footprint.
Depends on: 47378
taking bug.
Assignee: rayw → dougt
Status: ASSIGNED → NEW
Depends on: 48888
to kandrot who is working on Component registry loading
Assignee: dougt → kandrot
Status: NEW → ASSIGNED
per email with Jud, changing nsbeta3+ to nsbeta3- on all "embed" keyword bugs since embedding changes will not be made in the mn6 branch. If you feel this bug fix needs to go into mn6 branch, please list the reasons/user impact/risk and nominate for rtm. Thanks.
Whiteboard: [nsbeta3+] → [nsbeta3-]
leger@netscape.com is no longer a valid email. reassigning qa contact to the component's default.
QA Contact: leger → rayw
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I had changed and checked in the code to fix this back in August. The reg is read in one big read, processed, dumped, then the buffer size set back to a smaller size. This makes the load faster, and the long term memory usage smaller.
Component: XPCOM Registry → XPCOM
QA Contact: rayw → xpcom
You need to log in before you can comment on or make changes to this bug.