Closed Bug 187185 Opened 22 years ago Closed 22 years ago

Performance regression in pr_LoadLibraryByPathname [Mach-O]

Categories

(NSPR :: NSPR, defect, P1)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ccarlen, Assigned: ccarlen)

Details

This happened from the fix for bug 131036. I measured Ts time on my opt trunk build pulled today. without bug 131036 fix: 3604 with: 4254 That's pretty significant. The code tries GetDiskFragment() and then getLibraryBundle() before NSCreateObjectFileImageFromFile(). The latter is the most common case, certainly at startup, and it's being executed last after the others which are expensive.
Whoops - make that bug 131306.
Thanks for writing this bug, Conrad. This can be fixed by reordering the code in nsprpub/pr/src/linking/prlink.c. Between GetDiskFragment() and getLibraryBundle(), which one should we try first?
Priority: -- → P1
Target Milestone: --- → 4.3
Can we just bite the bullet and clean up all the #idfefs in that routine now?
I'm going to take care of this with bug 186599. I plan on breaking the different methods used inside pr_LoadLibraryByPathname out into subroutines and using an array of function pointers which can be reordered. That should clean up some of the #ifdef mess.
Assignee: beard → ccarlen
Status: NEW → ASSIGNED
Fixed by the patch in bug bug 186599.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Who can verify the Ts time is back to what it was before bug 131036 fix?
Sorry, that should be bug 131306.
You need to log in before you can comment on or make changes to this bug.