Closed Bug 263672 Opened 21 years ago Closed 14 years ago

Load of UTF-8 encoded file takes forever

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: peter.kovar, Assigned: blizzard)

Details

(Keywords: perf)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; sk-SK; rv:1.8a5) Gecko/20041008 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; sk-SK; rv:1.8a5) Gecko/20041008 Open the following test file and have a lot of patience. Reproducible: Always Steps to Reproduce: 1. Download test.utf8.bz2 2. bunzip2 test.utf8.bz2 3. File -> Open test.utf8 Actual Results: Nothing, just neverending wait. The same with Firefox. Opera crashed X server immediately!
bunzip2 test.utf8.bz2
Attached file UTF-8 degenerator
cc UTF-8.c -o UTF-8 ./UTF-8 0x20 0xFFFF > test.utf8
I see us spending forever in nsFontMetricsGTK::GetTextDimensions and nsFontMetricsGTK::FindFont on this testcase, presumably because this file covers all of UTF-8 and hence we have to look for all chars, and most fonts don't have most chars, which means that the time taken to render the page is O(# of chars times # of fonts installed on the machine). Per reporter's comments in other bugs, he is using a GTK2/XFT build; I have no idea what performance looks like for those (that is, where the time is spent).
Assignee: general → blizzard
Status: UNCONFIRMED → NEW
Component: Browser-General → GFX: Gtk
Ever confirmed: true
Keywords: perf
QA Contact: general → ian
WFM, Firefox trunk on Ubuntu-feisty. Can anyone else reproduce this bug in a recent trunk build? http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Whiteboard: CLOSEME 07/01
Debian 4.0 with all the free Unicode fonts installed and some third-party fonts like MathML ones. Confirmed with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070630 Minefield/3.0a6pre hung with 100% CPU usage, and was still hung after 4 minutes. With Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5pre) Gecko/20070630 BonEcho/2.0.0.5pre, the loading is complete after something like 17 seconds.
Whiteboard: CLOSEME 07/01
(In reply to comment #5) PS: according to fc-list, that's 462 fonts.
Product: Core → Core Graveyard
Loads in a reasonable amount of time for such a large file (less than five seconds) with Firefox 8.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Can’t reproduce (takes 10-20 seconds) with Firefox 8.0 or 3.6.14. Note that, when testing, you have to make sure the file is opened as UTF-8, not e.g. ISO-8859-1. Of course, the computer and Debian version are different now.
Status: RESOLVED → VERIFIED
Status: VERIFIED → RESOLVED
Closed: 14 years ago14 years ago
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: