Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netedit hangs when loading edge data #7604

Closed
ZoltanBaksa opened this issue Sep 27, 2020 · 10 comments
Closed

netedit hangs when loading edge data #7604

ZoltanBaksa opened this issue Sep 27, 2020 · 10 comments
Assignees
Labels
a:netconvert a:netedit bug netedit:dataElements Label for netedit tickets centered in data elements p:important more important than default but not 'critical'
Milestone

Comments

@ZoltanBaksa
Copy link

Hi,
I use the latest dev version v1_7_0+0223-4752229c79.
I have created random trips with randomTrips.py using the option --weights-output-prefix to be able to visualize the start and end edges. When I try to load the generated .dst file into netedit in Data Mode by clicking on File->Data Elements->Load Data Wlements and selecting the generated dst file, netedit hangs and does not responds.

@namdre namdre added a:netconvert bug p:important more important than default but not 'critical' labels Sep 28, 2020
@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

Looks like the algorithm has a major-inefficiency somewhere. It works fine on a small network but takes very long on a large network. (tested with tests/tools/import/OSM/webWizard/osmimport.tools).

I suspect this is related to computing the color-gradient (something along those lines came up previously).

@namdre namdre added this to the 1.8.0 milestone Sep 28, 2020
@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

@ZoltanBaksa As a workaround for only looking at the data, you might as well use sumo-gui.

@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

@zoltan: If a rainbow was created, this implies that a valid data range was found. Look into the input file and find an edge that has a different value from the others. Then locate this edge in sumo gui. Activating "show edge color value" may also help to validate what you see.

@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

@palvarezlopez This is what came out of a quick gprof run:


Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 21.62      3.44     3.44     3970     0.87     3.46  GNEDataInterval::updateGenericDataIDs()
 20.87      6.76     3.32  7898390     0.00     0.00  GUIGlObjectStorage::registerObject(GUIGlObject*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
 14.83      9.12     2.36  7898390     0.00     0.00  std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, GUIGlObject*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, GUIGlObject*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, GUIGlObject*> > >::erase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
 11.25     10.91     1.79  7898390     0.00     0.00  GUIGlObjectStorage::remove(unsigned int)
 10.43     12.57     1.66  7898390     0.00     0.00  std::_Rb_tree<unsigned int, std::pair<unsigned int const, GUIGlObject*>, std::_Select1st<std::pair<unsigned int const, GUIGlObject*> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, GUIGlObject*> > >::erase(unsigned int const&)
  5.91     13.51     0.94 31521800     0.00     0.00  GNEDataSet::AttributeColors::updateValues(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double)
  2.26     13.87     0.36  7898390     0.00     0.00  GUIGlObject::createFullName[abi:cxx11]() const
  2.26     14.23     0.36  7898390     0.00     0.00  GUIGlObjectStorage::getAllIDs() const
  1.63     14.49     0.26     7940     0.03     0.19  GNEDataInterval::updateAttributeColors()
  1.32     14.70     0.21  7882435     0.00     0.00  GUIGlObject::setMicrosimID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
  1.07     14.87     0.17 31685379     0.00     0.00  StringUtils::toDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

Since my network and data file only have ~4000 edges I suspect that registerObject gets called a bit too often.

@namdre
Copy link
Contributor

namdre commented Sep 28, 2020

also, when loading from a file, AttributeColors::updateValues should only be called after loading is complete.

@palvarezlopez
Copy link
Member

palvarezlopez commented Oct 5, 2020

@ZoltanBaksa I disabled two functions thats create a bottleneck loading data elements. Can you check if in your loading in NETEDIT works now?

@namdre
Copy link
Contributor

namdre commented Oct 5, 2020

pro:

  • the loading is very fast now
    con:
  • it crashes when selecting a data attribute in the edgeData frame (probably because the color values are not computed)
  • nothing can be selected in the interval bar
  • the loading-data dialog still isn't updated (and since loading is so fast it's not needed).

@namdre
Copy link
Contributor

namdre commented Oct 5, 2020

Both functions are responsible you disabled have quadratic effort since every call iterates over all interval elements. It should be sufficient to call this once after loading is complete.

@palvarezlopez palvarezlopez added the netedit:dataElements Label for netedit tickets centered in data elements label Oct 7, 2020
@namdre
Copy link
Contributor

namdre commented Oct 7, 2020

works for me now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:netconvert a:netedit bug netedit:dataElements Label for netedit tickets centered in data elements p:important more important than default but not 'critical'
Projects
None yet
Development

No branches or pull requests

3 participants