[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[glob2-devel] CPU usage et profiling:
From: |
Luc-Olivier de Charrière |
Subject: |
[glob2-devel] CPU usage et profiling: |
Date: |
Thu, 16 Oct 2003 16:56:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030911 |
Le CPU est assez problématique, j'ai finalement du changer le sytème
d'allocation des unités aux batiments par un système sous-optimal.
Même avec mon PC récent, les meilleures directives de compilation, et
des heures d'optimisations à la main, j'avais un jeu injouable.
Maintenant, j'ai des stats plus correctes, même sur une carte 256x256,
et plus de 500 unités:
cpu usage graph:
100.0 % | *******
98.5 % |
95.0 % |
93.5 % | *
90.0 % | *
88.5 % | **
85.0 % |
83.5 % | *
80.0 % | ***
78.5 % | **
75.0 % | **
73.5 % | *
70.0 % | *
68.5 % | *****
65.0 % | *********
63.5 % | ****************
60.0 % | *******************
58.5 % | ******************
55.0 % | **********
53.5 % | ***
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
21.25 29.73 29.73 5010368 0.01 0.01
SDLDrawableSurface::drawFilledRect(int, int, int, int, unsigned char,
unsigned char, unsigned char, unsigned char)
12.11 46.68 16.95 1298 13.06 13.06
Map::updateGlobalGradient(Building*, bool)
11.31 62.50 15.82
Map::cursorToBuildingPos(int, int, int, int, int*, int*, int, int)
8.83 74.86 12.36 24867 0.50 0.65
Map::updateGlobalGradient(unsigned char*)
7.24 84.99 10.13 1073188594 0.00 0.00
SDLDrawableSurface::setRes(int, int, int, unsigned int)
5.91 93.26 8.27 819797 0.01 0.01
SDLSprite::draw(SDL_Surface*, SDL_Rect const*, int, int, int)
5.50 100.96 7.70 226186 0.03 0.06
SDLDrawableSurface::drawLine(int, int, int, int, unsigned char, unsigned
char, unsigned char, unsigned char)
4.14 106.75 5.79 24158 0.24 0.24
Game::renderMiniMap(int, bool)
3.60 111.79 5.04 3485 1.45 1.45
Map::updateLocalGradient(Building*, bool)
2.76 115.65 3.86 24867 0.16 0.16
Map::ressourceAviable(int, int, bool, int, int, int*, int*, int*,
unsigned char)
2.53 119.19 3.54
SDLDrawableSurface::drawCircle(int, int, int, unsigned char, unsigned
char, unsigned char, unsigned char)
2.34 122.47 3.28
Map::buildingPosToCursor(int, int, int, int, int*, int*, int, int)
1.32 124.32 1.85 24723 0.07 1.86 Game::drawMap(int,
int, int, int, int, int, int, bool, bool, bool, bool)
1.21 126.01 1.69
SDLDrawableSurface::setClipRect(int, int, int, int)
0.86 127.21 1.20
SDLDrawableSurface::setAlpha(bool, unsigned char)
0.65 128.12 0.91
TTF_RenderUNICODE_Blended
0.59 128.95 0.83
SDLDrawableSurface::setClipRect()
0.53 129.69 0.74 33673182 0.00 0.00
SDLSprite::loadFrame(SDL_RWops*, SDL_RWops*, SDL_RWops*, SDL_RWops*)
0.51 130.40 0.71 Load_Glyph
On remarquera donc que les graphismes on repris de dessus!
Steph, tu comprends pourquoi "Map::cursorToBuildingPos(int, int, int,
int, int*, int*, int, int)" prends autant de temps ?
- [glob2-devel] CPU usage et profiling:,
Luc-Olivier de Charrière <=