Bug 3366 - Loading some images spends too much time in IcFetch_transform
Summary: Loading some images spends too much time in IcFetch_transform
Status: RESOLVED NOTOURBUG
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: 0.1.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL: http://bugzilla.ximian.com/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-22 09:47 UTC by Ben Maurer
Modified: 2005-08-21 20:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ben Maurer 2005-05-22 09:47:19 UTC
See this bug from Mono bugzilla:

http://bugzilla.ximian.com/show_bug.cgi?id=74635

Loading some jpeg images ends up spending lots of extra time in the libpixman
library. Results from oprofile:

Fast image:

787075   34.7743  no-vmlinux               (no symbols)
244622   10.8078  libjpeg.so.62.0.0        jpeg_idct_islow
152634    6.7436  libjpeg.so.62.0.0        decode_mcu
94061     4.1558  libjpeg.so.62.0.0        h2v2_merged_upsample
68973     3.0473  oprofiled                odb_insert
47168     2.0840  libjpeg.so.62.0.0        jpeg_fill_bit_buffer
38840     1.7160  oprofiled                opd_process_samples
37707     1.6660  libgdiplus.so.0.0.0      gdip_load_jpeg_image_internal
34325     1.5165  oprofiled                sfile_log_sample
34225     1.5121  libglib-2.0.so.0.400.6   g_tree_node_lookup
31962     1.4121  oprofiled                pop_buffer_value
30433     1.3446  oprofiled                sfile_find
28715     1.2687  libgdiplus.so.0.0.0      pixman_compositeSrc_8888x8888
21785     0.9625  libc.so.6                __GI_memcpy
19941     0.8810  libc.so.6                __GI_memset

Slow image:
558131   24.0266  no-vmlinux               (no symbols)
237923   10.2422  libgdiplus.so.0.0.0      IcFetch_transform
219294    9.4402  libgdiplus.so.0.0.0      pixman_transform_point
162648    7.0017  libgdiplus.so.0.0.0      __divdi3
116562    5.0178  libjpeg.so.62.0.0        jpeg_idct_islow
71268     3.0680  libjpeg.so.62.0.0        decode_mcu
62372     2.6850  oprofiled                odb_insert
45776     1.9706  libjpeg.so.62.0.0        h2v2_merged_upsample
38857     1.6727  oprofiled                opd_process_samples
34782     1.4973  oprofiled                sfile_log_sample
34665     1.4923  libgdiplus.so.0.0.0      IcCombineOverU
31742     1.3664  oprofiled                pop_buffer_value
26167     1.1264  libc.so.6                __GI_memcpy
23079     0.9935  oprofiled                sfile_find

The images that suffer from this, and a C# test case are on the Ximian bug.
Comment 1 Owen Taylor 2005-08-22 12:29:26 UTC
I think your code must be ending up drawing the images at non-integer
offsets, which triggers the general code path and is slower (and causes
fuzzy results)

There have been some improvements to libpixman in the general code path,
so it will be better - maybe a factor of 2 better, but non integer
translations will still be slower.

(Just filed https://bugs.freedesktop.org/show_bug.cgi?id=4189
for one thing related to this ... if the filter on the source image
is NEAREST, then we can optimize non-integer translations to integer
translations)



Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.