General > Discussion
Optimization bug connected with language file
noob:
tried console command
> fontcachelist
when fps begin decreasing got this in console
--- Code: ---]fontcachelist
Font cache info
========================
...font cache size: 1024 - used 45
...1 collisions for f_smallP8P3Q
...overall collisions 1
--- End code ---
when i started a game(heavy decrease of fps in main history dialog first) and after it tried this command:
--- Code: ---=P> (PP5P;P8QP0P9Q
...13 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
=P> (PP5P;P8QP0P9Q
...12 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
=P> (PP5P;P8QP0P9Q
...11 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
=P> (PP5P;P8QP0P9Q
...10 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
=P> (PP5P;P8QP0P9Q
...9 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...8 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...7 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...6 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...5 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...4 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...3 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...2 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...1 collisions for f_small2084 P$P5P2 21, 06:00: P!QQ
P> (PP5P;P8QP0P9Q
...overall collisions 106492
--- End code ---
in different menus after starting game its different, for example this
--- Code: ---5Q
...1 collisions for f_verysmallP P5QP?QP1P;P8P:P0
...1 collisions for f_smallPQP1P5Q
...1 collisions for f_big100000 P:Q
...1 collisions for f_smallCan't transfer (click for more info)
...1 collisions for f_bigP5P4P8P=QQP2P5P=P=P0Q P;P8P=P8Q P>P1P>Q
QP5P1P5 P?P>QP5
...1 collisions for f_menuP!P=P0Q
...1 collisions for f_bigPP>P2P0Q P1P0P7P0
...1 collisions for f_smallP-P;P5P:QQ
...overall collisions 555
--- End code ---
tried mem_stats
--- Code: ---]mem_stats
Memory stats:
blocks size name
--- ------ ---------- ---------- --------
# 1 10 960B ( 0.001MB) Common: Alias system
# 2 1441 138304B ( 0.132MB) Common: Command system
# 3 0 0B ( 0.000MB) Common: Collision model
# 4 836 73632B ( 0.070MB) Common: Cvar system
# 5 16 16218720B (15.467MB) Common: File system
# 6 5774 382048B ( 0.364MB) Generic
# 7 0 0B ( 0.000MB) Network
# 8 0 0B ( 0.000MB) Server: Game system
# 9 21 1344B ( 0.001MB) Server: Generic
#10 2267 183840B ( 0.175MB) Client: Local (per game)
#11 539 41248B ( 0.039MB) Client: Generic
#12 665 314496B ( 0.300MB) Client: Menu
#13 36 2336B ( 0.002MB) Client: Sound system
#14 0 0B ( 0.000MB) Client: IRC system
#15 0 0B ( 0.000MB) Vid: Generic
#16 7 9961920B ( 9.500MB) Vid: Image system
#17 0 0B ( 0.000MB) Vid: Light system
#18 778 60516960B (57.713MB) Vid: Model system
----------------------------------------
Total: 18 pools, 12390 blocks, 87835808 bytes (83.767MB)
--- End code ---
btw strange thing with console fonts in some commands their discription is looking like this, not in english "P5P4P8P=QQP2P5P=P=P0Q P;P8P=P8Q P>P1P>Q"
noob:
found maybe a solution of problem...
http://www.balooga.com/dokuwiki/doku.php?id=lispbuilder-sdl-ttf
interesting moments:
http://osdir.com/ml/games.enigma.devel/2006-10/msg00019.html
quatation:
"It looks like SDL_ttf accesses the font for every displayed cyrillic
character again and again. If you look at the SDL source SDL_ttf.c:
static FT_Error Find_Glyph( TTF_Font* font, Uint16 ch, int want )...."
noob:
found patch for utf 8 buy/sell menu(this bug is still present in current revision)
here it is(bug):
https://sourceforge.net/tracker/index.php?func=detail&aid=1782007&group_id=%20%20157793&atid=805242
patch:
http://sourceforge.net/tracker/index.php?func=detail&aid=1909729&group_id=157793&atid=805244
why nobody from programmist applied it? tested it on revision 15497 (it works)
Kildor:
because «this is not a patch but hack to mask wrong behaviour».
noob:
he did it, he did it!
Speed up Cyrillic text by caching result of line wrapping (big change)
Should also fix Chinese line breaking
m_node_text.c: Break MN_DrawTextNode loop early if possible; this stops geoscape from walking through entire message history on every frame.
m_node_text.c: Interface change to R_FontDrawString when using scroll windows: y is now at top of scroll window
r_font.c: Support for truncating lines instead of wrapping (not used yet)
Speed summary Cyrillic: intro sequence went from 4 fps to 50; ufopedia went from 12 fps to 50; geoscape went from 4 fps to 12
Speed summary English: geoscape went from 7 fps to 12; others were already at 50 fps.
congratulation to all russian fans ;D problem is fixed now
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version