Closed Bug 30160 Opened 26 years ago Closed 26 years ago

improve font lookup performance on Unix

Categories

(Core :: Layout, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: erik, Assigned: tor)

Details

(Whiteboard: [PDT+] w/b minus on 3/6. reviewed by blizzard and erik)

Attachments

(1 file)

We need to get rid of the expensive XListFontsWithInfo calls. From bug 14961: ------- Additional Comments From tor@cs.brown.edu 2000-03-02 16:28 ------- http://www.linux.com/ runs quite slow due to font querying on Unix. Timing performed with a 3/2 morning cvs pull compiled with --disable-debug --enable-optimize --enable-x11-shm. The test machine was a Sun Ultra-10 (440Mhz/afb) running Solaris 2.7. viewer was started with "about:blank", then "http://www.linux.com/" typed into the url entry box. start end elapsed viewer 0:02 0:03 0:01 Xsun 96:57 97:26 0:29 wall time 0:36 Examining an xscope log of a similar session, I see three groups of continuous ListFontsWithInfo calls amounting for about 28 seconds worth of load time. start load ~ 29.56s ListFontsWithInfo 30.51-31.42 ~15 calls ListFontsWithInfo 31.72-57.15 ~180 calls ListFontsWithInfo 58.25-59.97 ~12 calls finish load ~ 67.46s
It turns out all the calls to XListFontsWithInfo in this test were coming from nsDeviceContextGTK::CheckFontExistence, which never used the font struct that was returned. A simple replacement with XListFonts sped things up immensely. The same test as before now runs like this: start end elapsed viewer 0:02 0:03 0:01 Xsun 110:05 110:06 0:01 wall time 0:05 Could you review the patch for checkin?
Status: NEW → ASSIGNED
Keywords: beta1
Whiteboard: waiting for review
Meant to assign this to myself with the last change.
Assignee: erik → tor
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
We should so check this in. r=blizzard
r=erik
Whiteboard: waiting for review → reviewed by blizzard and erik
[PDT+] w/b minus on 3/6
Whiteboard: reviewed by blizzard and erik → [PDT+] w/b minus on 3/6. reviewed by blizzard and erik
tor, please check this in before 3/6! Thanks.
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Since I can't get access to a machine mentioned, Erik could you please mark this as verified ? Thanks.
Although tor was using a Sun box, the code change was in an area that affects all Unixes, including Linux. Petersen, do you have access to a Linux box?
Yes, I will check with latest build on Linux Redhat.
With the March 9th build (2000030913), this problem is resolved.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: