FreeOrion

Forums for the FreeOrion project
It is currently Tue Oct 24, 2017 12:35 am

All times are UTC




Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Thu Jul 02, 2015 10:16 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
Base of branch (partial resolved research window):
best FPS): 15
worst FP: 1
max draw calls: 1.7k

Tip of branch (partial resolved research window):
best FPS: 30
worst FPS: 15
max draw calls: ~950

Data obtained with
Code:
GALLIUM_HUD=fps,draw-calls ./freeorion


No visible artifacts. Go merge it.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
PostPosted: Thu Jul 02, 2015 10:18 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3248
MatGB wrote:
Edit: on the main map window, it's not just a perception, massive improvement in mouse responsiveness and general control over screen and game.

To follow up on this and because I edited at the same time Geoff posted, before this patch my mouse, even on small maps, was very slow to catch up with me in game, now it's moving at the same rate as in, say, my browser window, as far as I can see. And I've just researched Omni Scanner, which normally causes a further slowdown, not with this.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Thu Jul 02, 2015 10:45 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4371
woot! Props to Geoff! (and raptor & adrian helping nudge things along). Sounds like this will be a nice improvement for many people.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Fri Jul 03, 2015 12:04 pm 
Offline
Content Scripter
User avatar

Joined: Sat Mar 17, 2007 12:28 am
Posts: 685
Geoff the Medio wrote:
Sloth wrote:
For me the easiest way to crash my framerate is to build the super testers takeover. With a big galaxy (250+) fully visible it even becomes hard to click on a system, because the mouse cursor reacts so badly.
Have you turned off background starfields and galaxy gas, and tried enabling or disabling optimizing system rendering?
The gas rendering was the culprit. The difference is huge! Everything else didn't matter.

Thanks for the hint Geoff!

_________________
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.


Top
 Profile  
 
PostPosted: Fri Jul 03, 2015 12:20 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12007
Location: Munich
I always run "freeorion -r" as that turns off the (imo unnecessary) eye candy including galaxy gas, and a few other things...


Top
 Profile  
 
PostPosted: Fri Jul 03, 2015 1:05 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3248
Re the gas, I sorta like it, and my new machine can handle it, but it blurs very quickly with the molecular clouds, making them much harder to spot, could we have a bit of differentiation between them colour wise?

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Fri Jul 03, 2015 1:42 pm 
Offline
Pupating Mass

Joined: Fri Mar 15, 2013 12:54 pm
Posts: 96
thanks for the merge, my performance doubled from 10 fps to 20


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 5:01 pm 
Offline
Space Dragon
User avatar

Joined: Sun Mar 23, 2014 6:10 pm
Posts: 341
raptor wrote:
I did a callgrind analysis of the tech-tree window.
Hello, can you share some of your experience doing so ?
Just a quick howto get on the tracks.
- how do you launch a callgrind analysis on FO
- is it solwing FO down badly ? By how much ?
etc...

Thanks

_________________
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 11:15 pm 
Offline
Space Squid

Joined: Sat Jun 02, 2012 11:29 pm
Posts: 74
Hi,

I do this on Linux; my process is as follows:

1. Compile freeorion with debugging symbols. This means running a fresh CMake build. I do the following:
Code:
cd /dir/to/freeorion/
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
ln -s ../default

That last command just makes the resources available to the binary you just compiled in the 'build' directory. It takes about 1/2 hour for me to compile from scratch.

2. Use callgrind to launch freeorion. I run it with the newly created debug-symbol-enriched binary like so:
Code:
valgrind --tool=callgrind ./freeorion

3. Be patient. Very patient. Callgrind will slow down the game by as much as 1/100 the normal speed. I had to wait about 5 min. for it to start up.
4. Start a very lightweight game (or as lightweight as possible). I chose 1 AI, 10 stars
5. Do your test plan. For the performance issues, my test plan was just to open the tech-window, show all locked techs, and let it render for 5 min.
6. Quit freeorion
7. Open the callgrind.out.1234 (or whatever the numbers are) file in a viewer. I use kcachegrind.
8. Analyze the callgraph. I'm no expert at this and sometimes you have to take care to find the correct node where the processing is being spent, and not a parent node.


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 11:27 pm 
Offline
Space Dragon
User avatar

Joined: Sun Mar 23, 2014 6:10 pm
Posts: 341
OK thanks, that's also how I do it, but to skip a lot of the overhead before the really interesting part, I do start it with:
Code:
valgrind --tool=callgrind --instr-atstart=no ./freeorion

Then when I'm ready to gather the call traces, I do:
Code:
callgrind_control -i on

After capturing my profile data:
Code:
callgrind_control -i off

To avoid loosing to much time, I use a special build (-O2) but with the debug symbols still present...

_________________
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!


Top
 Profile  
 
PostPosted: Sun Jul 05, 2015 11:02 am 
Offline
Pupating Mass

Joined: Fri Mar 15, 2013 12:54 pm
Posts: 96
another profiler is sysprof
Image


Top
 Profile  
 
PostPosted: Mon Jul 06, 2015 11:05 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 204
Location: France
I just tested the new build... and wow, the improvement is very noticeable.

- Before, when I selected a system right after the game loading, there was a freeze of 2-3 seconds before the sidepanel shows up. Now, it's instantaneous
- When I toggled all techs in the Research panel, it took 3-4 seconds. Now, it's instantaneous.
- Same with the unavaialable ship parts in the Production panel.

I don't know if it's related to this improvement, but I set the FPS limiter to 30 fps, but in the previous versions, it didn't seem to have any effect (it could go up to 50 fps despite the setting). Now, it seems to be a constant 30 fps (closing all windows and doing nothing, it goes up to 40 fps, then goes down to 30 fps). Nice.

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Top
 Profile  
 
PostPosted: Tue Jul 14, 2015 11:59 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3248
MatGB wrote:
MatGB wrote:
Edit: on the main map window, it's not just a perception, massive improvement in mouse responsiveness and general control over screen and game.

To follow up on this and because I edited at the same time Geoff posted, before this patch my mouse, even on small maps, was very slow to catch up with me in game, now it's moving at the same rate as in, say, my browser window, as far as I can see. And I've just researched Omni Scanner, which normally causes a further slowdown, not with this.

More feedback, I'm using the Windows laptop now and the improvement is even more noticeable than it was on Linux, vastly improved framerates, the game mouse pointer stays with the system pointer with no noticeable lag.

This is definitely worth highlighting in the changelog as while it didn't bother everyone for those of us it did it's a significant improvement in performance.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Fri Jul 17, 2015 8:23 am 
Offline
Pupating Mass

Joined: Fri Mar 15, 2013 12:54 pm
Posts: 96
I have a feeling theres way more performance improvement possible, please keep at it to the point it runs @60fps on fast computers


Top
 Profile  
 
PostPosted: Fri Jul 17, 2015 8:29 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12007
Location: Munich
pheldens wrote:
I have a feeling theres way more performance improvement possible, please keep at it to the point it runs @60fps on fast computers
Yes, much of the GUI rendering, including almost any widgets that have details like curved edges, are rendered with very inefficient immediate OpenGL calls. Switching everything over to vertex buffers would help quite a bit, particularly on things like the research screen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group