FreeOrion

Forums for the FreeOrion project
It is currently Tue Dec 12, 2017 8:02 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Tue Dec 15, 2015 10:04 pm 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
I encountered a bug when i was testing the git branch release-0.4.5. I played it for a while. Since there where autosaves every turn i did not save manualy. I realised, that selecting the "auto" folder in the loadsavegame-dialog was slow (3-5 seconds to list the 10 files). So i started digging. I also was kind of confusing to me, that there are so many systems with the same name. Anyway i used

valgrind --tool=callgrind
gprof2dot -f callgrind -s callgrind.out.1234 > foo.dot
dot -Tsvg -O foo.dot

to generate an svg callgraph. I added a little debug output to see how often that particulare code failed. It was every time on char "0x33f". I did not spend much time on finding that particular char. With the applied patch I also had less problems with the framerate. I'm note sure if it is related to the font-/glyph-cache discussed in the performance thread viewtopic.php?f=9&t=7828&start=30

The main idea of the patch is to introduce a default char that is loaded if FT_Load_Glyph failes to load a particular glyph. The benefits are, that the fontmanager loads and caches the font instead of trieing to load the font, fail and fall back to the DefaultFont.h. This also solved my problem with the 'many systems with the same name' since ":alpha:" is not part of DefaultFont.h.

I'm on archlinux with freetype 2.6.2-1.

(btw: german would be easier for me)

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
PostPosted: Tue Dec 15, 2015 11:11 pm 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
I don't see a pull request numbered 426 on github...


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 1:44 am 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
that's strange. I think did some configurations on my github account. I have to login into github to see my PRs. Without login i cannot see my PR on the freeorion-project.

(btw: the link is correkt)

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 2:24 am 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
did some more testing and screenshooting with enabled fps, with and without the patch. The patched Version shows a better FPS if text is rendered. The world is 1000Systems, Disc, 20AIs everything else is set to medium. Besides the higher FPS the game is more respnsive to interactions and the alphas and betas are displayed (The selected system in the screenshot is "Dres β" not "Dres "). The ResearchPannel seams to benefit from it too, the framerate increased from 8 to 27FPS here.

System is basicaly an Arch Linux on a midrange laptop in develmode :)
8GB RAM
256GB SSD
Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (Quadcore)
Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev ff)


Attachments:
File comment: closeup without the patch; many text elements; 40 FPS
small_patch_closeup_1000_20.jpg
small_patch_closeup_1000_20.jpg [ 239.88 KiB | Viewed 5228 times ]
File comment: closeup without the patch; many text elements; 18 FPS
small_without_patch_closeup_1000_20.jpg
small_without_patch_closeup_1000_20.jpg [ 240.48 KiB | Viewed 5228 times ]
File comment: discworld without the patch; few text elements; 60 FPS
small_without_patch_discworld_1000_20.jpg
small_without_patch_discworld_1000_20.jpg [ 167.67 KiB | Viewed 5228 times ]

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)
Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 8:18 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4288
Location: Sol III
Hm, very strange... PR#426 does not exists. Neither does a issue with that number. There is simply no open or closed PR or issue with that number... looks like something went awry on github. Banduri, could you please recreate that PR?

Regarding the actual issue: Once in a while I stumbled across that issue too - built a new version, tested it, suddenly all the greek letters were gone. Deleting config.xml helped in my case.

Nevertheless, if your patch improves performance and offers better fallback handling in case of errors, we should still incorporate it. So, as already mentioned above, pls recreate your PR, so we can take a look at the patch.


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 9:31 am 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
That sounds interesting, but unless you can get the pull request working, there not much we can do with it...


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 11:20 am 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
Github had flaged me as a bot :P. Contacted support and it's working now.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 4:07 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3289
banduri wrote:
Github had flaged me as a bot :P. Contacted support and it's working now.

Well, nice to know they have anti-bot procedures, shame they're not perfect. Still, sorted. I have no opinion on the code as it's backend stuff, but wondering if it might be better to load an 'error' glyph instead of a space? Then at least the user would know there's something meant to be there, I'm thinking something similar to the unicode web browser error symbols.

_________________
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: Wed Dec 16, 2015 4:48 pm 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
MatGB wrote:
banduri wrote:
Github had flaged me as a bot :P. Contacted support and it's working now.

Well, nice to know they have anti-bot procedures, shame they're not perfect.


I'm using TorBrowser to access the web. Stuff like that happens all the time. But I've to admit github did a good job :)

MatGB wrote:
Still, sorted. I have no opinion on the code as it's backend stuff, but wondering if it might be better to load an 'error' glyph instead of a space? Then at least the user would know there's something meant to be there, I'm thinking something similar to the unicode web browser error symbols.


Thought about that too, but I couldn't find any good/harmless glyph - I'm open for suggestions. The "DEL"-glyph (0x7f) came into my mind, but it is a control char which may interfere otherwise. The NULL (0x00) ... well :). Also the codepoint must be part of most fonts since otherwise russian/chinese may make some problems.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
PostPosted: Wed Dec 16, 2015 8:56 pm 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
banduri wrote:
I couldn't find any good/harmless glyph - I'm open for suggestions.

A friend told me I should use
Quote:
U+FFFD � replacement character used to replace an unknown or unrepresentable character


I tested that one and it looks fine. Will update the PR soon.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
PostPosted: Fri Dec 18, 2015 3:08 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4288
Location: Sol III
Banduri, we need a license statement from you that you release your contributions according to the licenses the FreeOrion project uses (see here). Probably the best way to do that is to put a respective statement into your sig (see Mats sig as an example).


Top
 Profile  
 
PostPosted: Fri Dec 18, 2015 5:37 pm 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
Vezzra wrote:
Banduri, we need a license statement from you that you release your contributions according to the licenses the FreeOrion project uses (see here). Probably the best way to do that is to put a respective statement into your sig (see Mats sig as an example).


sure: GPL v2 or higher is fine with me

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

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