Hi. I want to tell about GUI performance after last updates. I don't know what is reason of strong slowing - update my Gentoo Linux or update freeorion GIT. I got very slow mouse motion in case I switch to Production window. Also all selections very slow, around 2 seconds at first turn. I think that problem in graphics performance. I have Nvidia with proprietary driver 358.16. Another OpenGL games works fine. This is my current library versions:
Code: Select all
2015-12-06 13:36:34.445186 [debug] Client : Logger initialized
2015-12-06 13:36:34.445616 [debug] Client : v0.4.5+ [build 2015-12-04.eaabf3d] CMake
2015-12-06 13:36:34.445674 [debug] Client : GL Version String: 4.5.0 NVIDIA 358.16
2015-12-06 13:36:34.445750 [debug] Client : Dependency versions from headers:
2015-12-06 13:36:34.445766 [debug] Client : Boost: 1_57
2015-12-06 13:36:34.445785 [debug] Client : FreeType: 2.6.2
2015-12-06 13:36:34.445798 [debug] Client : PNG: 1.6.20+apng
2015-12-06 13:36:34.445811 [debug] Client : Python: 2.7.10
2015-12-06 13:36:34.445824 [debug] Client : SDL: 2.0.3
2015-12-06 13:36:34.445837 [debug] Client : zlib: 1.2.8
2015-12-06 13:36:35.253306 [debug] Client : OpenAL initialized. Version 1.1 ALSOFT 1.16.0Renderer OpenAL SoftVendor OpenAL Community
Extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length
2015-12-06 13:36:38.702216 [debug] Client : BasesListBox::Populate
2015-12-06 13:36:38.702263 [debug] Client : BasesListBox::PopulateWithSavedDesigns
2015-12-06 13:36:38.712977 [debug] Client : DesignWnd::MainPanel::ReregisterDesigns
2015-12-06 13:36:39.896137 [debug] Client : Limited FPS to 60
2015-12-06 13:36:39.906981 [debug] Client : OpenGL Version Number: 4.5
Next, I checked log file and saw that some functions uses too many time. I check around code and saw next strings:
Code: Select all
DebugLogger() << "Tech Tree Layout Preparing Tech Data";
// create a node for every tech
TechManager& manager = GetTechManager();
for (TechManager::iterator it = manager.begin(); it != manager.end(); ++it) {
const Tech* tech = *it;
if (!tech) continue;
const std::string& tech_name = tech->Name();
if (!TechVisible(tech_name, m_categories_shown, m_tech_statuses_shown)) continue;
m_techs[tech_name] = new TechPanel(tech_name, this);
m_graph.AddNode(tech_name, m_techs[tech_name]->Width(), m_techs[tech_name]->Height());
}
// create an edge for every prerequisite
for (TechManager::iterator it = manager.begin(); it != manager.end(); ++it) {
const Tech* tech = *it;
if (!tech) continue;
const std::string& tech_name = tech->Name();
if (!TechVisible(tech_name, m_categories_shown, m_tech_statuses_shown)) continue;
for (std::set<std::string>::const_iterator prereq_it = tech->Prerequisites().begin();
prereq_it != tech->Prerequisites().end(); ++prereq_it)
{
if (!TechVisible(*prereq_it, m_categories_shown, m_tech_statuses_shown)) continue;
m_graph.AddEdge(*prereq_it, tech_name);
}
}
I think here 2 loops may be combined into single loop:
Code: Select all
DebugLogger() << "Tech Tree Layout Preparing Tech Data";
TechManager& manager = GetTechManager();
for (TechManager::iterator it = manager.begin(); it != manager.end(); ++it) {
const Tech* tech = *it;
if (!tech) continue;
const std::string& tech_name = tech->Name();
if (!TechVisible(tech_name, m_categories_shown, m_tech_statuses_shown)) continue;
// create a node for every tech
m_techs[tech_name] = new TechPanel(tech_name, this);
m_graph.AddNode(tech_name, m_techs[tech_name]->Width(), m_techs[tech_name]->Height());
// create an edge for every prerequisite
for (std::set<std::string>::const_iterator prereq_it = tech->Prerequisites().begin();
prereq_it != tech->Prerequisites().end(); ++prereq_it)
{
if (!TechVisible(*prereq_it, m_categories_shown, m_tech_statuses_shown)) continue;
m_graph.AddEdge(*prereq_it, tech_name);
}
}
---
added: I check this thing but got segfault