project-navigation
Personal tools

Author Topic: Optimization bug connected with language file  (Read 10758 times)

Offline noob

  • Rookie
  • ***
  • Posts: 59
  • http://tinyurl.com/68elb57 >>x-com style models<<
    • View Profile
Re: Optimization bug connected with language file
« Reply #15 on: June 24, 2008, 09:22:41 pm »
tried console command
> fontcachelist

when fps begin decreasing got this in console

Code: [Select]
]fontcachelist
Font cache info
========================
...font cache size: 1024 - used 45
...1 collisions for f_smallP8P3Q
...overall collisions 1


when i started a game(heavy decrease of fps in main history dialog first) and after it tried this command:
Code: [Select]
=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

in different menus after starting game its different, for example this
Code: [Select]
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

tried mem_stats
Code: [Select]
]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)

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"
« Last Edit: June 24, 2008, 09:42:05 pm by noob »

Offline noob

  • Rookie
  • ***
  • Posts: 59
  • http://tinyurl.com/68elb57 >>x-com style models<<
    • View Profile
Re: Optimization bug connected with language file
« Reply #16 on: June 25, 2008, 03:03:10 pm »
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 )...."

Offline noob

  • Rookie
  • ***
  • Posts: 59
  • http://tinyurl.com/68elb57 >>x-com style models<<
    • View Profile
Re: Optimization bug connected with language file
« Reply #17 on: September 04, 2008, 12:43:34 pm »
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)

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Optimization bug connected with language file
« Reply #18 on: September 04, 2008, 01:20:46 pm »
because «this is not a patch but hack to mask wrong behaviour».

Offline noob

  • Rookie
  • ***
  • Posts: 59
  • http://tinyurl.com/68elb57 >>x-com style models<<
    • View Profile
Re: Optimization bug connected with language file
« Reply #19 on: October 18, 2008, 12:54:46 am »
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

Offline TroubleMaker

  • Squad Leader
  • ****
  • Posts: 114
    • View Profile
Re: Optimization bug connected with language file
« Reply #20 on: October 20, 2008, 04:42:40 am »
he did it, he did it!
As kildor mentioned that in Russian forum, we will check it and, hope, will enjoy it.
Thank you, devs!

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Optimization bug connected with language file
« Reply #21 on: October 20, 2008, 05:53:11 am »
I`ve already enjoyed this ;-)

Game start to be totally russian-usable on this weekend