Load of UTF-8 encoded file takes forever

RESOLVED WORKSFORME

Status

Core Graveyard
GFX: Gtk
RESOLVED WORKSFORME
14 years ago
6 years ago

People

(Reporter: Peter Kovář, Assigned: blizzard)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
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!
(Reporter)

Comment 1

14 years ago
Created attachment 161605 [details]
bzip2 compressed test.utf8

bunzip2 test.utf8.bz2
(Reporter)

Comment 2

14 years ago
Created attachment 161606 [details]
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

Comment 4

11 years ago
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

Comment 5

11 years ago
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

Comment 6

11 years ago
(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
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME

Comment 8

6 years ago
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

Updated

6 years ago
Status: VERIFIED → RESOLVED
Last Resolved: 6 years ago6 years ago
You need to log in before you can comment on or make changes to this bug.