OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000571OMNeT++IDE / C++ developmentpublic2012-05-17 12:412013-12-06 15:29
rhornig 
rhornig 
normalminorsometimes
resolvedfixed 
4.2.2 
4.3 
0000571: Indexing happens too often and takes to long
e.g. before starting the simulation
No tags attached.
Issue History
2012-05-17 12:41rhornigNew Issue
2012-09-27 10:30andrasNote Added: 0000770
2012-09-27 10:33andrasNote Added: 0000771
2013-12-06 15:29rhornigNote Added: 0000846
2013-12-06 15:29rhornigStatusnew => resolved
2013-12-06 15:29rhornigFixed in Version => 4.3
2013-12-06 15:29rhornigResolutionopen => fixed
2013-12-06 15:29rhornigAssigned To => rhornig

Notes
(0000770)
andras   
2012-09-27 10:30   
Background: We use the C++ index for dependency generation in the Makefile. Makefiles are refreshed before each build, and thus dependencies in them are also updated if needed. Originally (in 4.0), we used some simple code to basically just grep all #include lines from the source files, and turn that into dependencies. Then, when we introduced Project Features, lots of #includes in INET/INETMANET became conditional (inside #if/#ifdef), and we had switch to a more sophisticated solution that only takes the actually active #include lines as dependencies (and ignores those in disabled code blocks). The idea was to use the index, because CDT's parser follows the #ifs/#ifdefs correctly and knows which #includes are active and which are not. The consequence was that we had to ensure that the index is up to date before each build, otherwise dependencies in the generated Makefiles would be based on obsolete info, which could result in non-obvious build errors.

Updating the index is usually incremental (=fast). However, when defined symbols change (as e.g. in the case of turning project features on or off), CDT cannot update the index incrementally, but instead we have to trigger a full reindexing which takes a long time. Other changes in the C/C++ configuration of the project may also trigger full reindexing. After just source code changes, however, CDT can incrementally update the index, so it shouldn't take long.
(0000771)
andras   
2012-09-27 10:33   
Implementation note: we need to reimplement extracting the active #includes without using the index. Bits'n'pieces of CDT code seems useful for the implementation: CPreprocessor class and especially its helper classes ExpressionEvaluator, MacroDefinitionParser, MacroExpander.
(0000846)
rhornig   
2013-12-06 15:29   
Was fixed for 4.3 by reimplementing the dependency generator.