bugThe FreeType Project - Bugs: bug #54257, Unexceptably slow FT_New_Face for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #54257: Unexceptably slow FT_New_Face for PCF font

Submitter:  Alexei Podtelezhnikov <podtelez>
Submitted:  Fri 06 Jul 2018 02:41:35 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  podtelez Open/Closed:  Open
Planned Release:  None

Mon 24 Jun 2019 09:18:23 AM UTC, comment #5: 

Indeed:

> time ftstring -k3gvgvgvq 16 unifont-12.1.01.pcf.gz
FreeType String Viewer - press ? for help
Execution completed successfully.

real    0m24.480s
user    0m24.227s
sys     0m0.100s

> time ftstring -k3gvgvgvq 16 unifont-12.1.01.pcf
FreeType String Viewer - press ? for help
Execution completed successfully.

real    0m0.076s
user    0m0.059s
sys     0m0.009s


This is a difference by approx. factor 300!

Werner LEMBERG <wl>
Group administrator
Sun 23 Jun 2019 07:21:54 PM UTC, comment #4: 

Gzipped PCF's are still hardly usable because each FT_Load_Glyph does "inflate".

Compare these:
bin/ftstring -k3gvgvgv 16 unifont-12.1.01.pcf.gz
bin/ftstring -k3gvgvgv 16 unifont-12.1.01.pcf

The font is here.

Alexei Podtelezhnikov <podtelez>
Group Member
Fri 21 Sep 2018 09:23:40 PM UTC, comment #3: 

Thanks for working on it.  Both PCF and BDF drivers are contributed code...

Werner LEMBERG <wl>
Group administrator
Fri 21 Sep 2018 03:10:21 PM UTC, comment #2: 

Working with the gzipped file is too slow. It does not appear to be cached well too -- try waterfall plots in ftstring or ftview.

$ bin/ftbench ../unifont-11.0.01.pcf.gz


  Get_Char_Index                 0.045 us/op   44240875 done
  Iterate CMap                2902.692 us/op        689 done
  New_Face                  110020.736 us/op         19 done


Alexei Podtelezhnikov <podtelez>
Group Member
Fri 21 Sep 2018 03:02:52 PM UTC, comment #1: 

$ bin/ftbench ../unifont-11.0.01.pcf

Before this commit

  Get_Char_Index                 0.196 us/op   10218394 done
  Iterate CMap               11537.837 us/op        174 done
  New_Face                   19428.530 us/op        103 done


After this commit

  Get_Char_Index                 0.049 us/op   40987030 done
  Iterate CMap                2909.412 us/op        688 done
  New_Face                   17260.439 us/op        116 done


Alexei Podtelezhnikov <podtelez>
Group Member
Fri 06 Jul 2018 02:41:35 PM UTC, original submission:  

Yes, this is a large font, but FT_New_Face is just awfully slow.

$ bin/ftbench ../unifont-11.0.01.pcf
...
executing tests:
  Load                           0.314 us/op    6393744 done
  Load_Advances (Normal)         0.322 us/op    6222483 done
  Load_Advances (Fast)           0.325 us/op    6165396 done
  Load_Advances (Unscaled)       0.327 us/op    6108309 done
  Render                         0.376 us/op    1883871 done
  Get_Glyph                      0.575 us/op    1598436 done
  Get_CBox                       0.444 us/op    1370088 done
  Get_Char_Index                 0.196 us/op   10218394 done
  Iterate CMap               11537.837 us/op        174 done
  New_Face                   19428.530 us/op        103 done
  Embolden                       1.565 us/op     913392 done
  Get_BBox                       0.423 us/op    1598436 done
  Create face & load glyph(s)      0.715 us/op    2797263 done


Alexei Podtelezhnikov <podtelez>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by podtelez
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by podtelez (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-23 podtelez Carbon-Copy- Added dxdy
    2018-09-21 wl Assigned toNone podtelez

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code