MantisBT - JANA | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000302 | JANA | Feature Request | public | 2013-02-13 08:17 | 2013-03-01 16:08 |
Reporter | davidl | ||||
Assigned To | davidl | ||||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Summary | 0000302: Cache XML node names to speed up JGeometryXML::Get() | ||||
Description | Startup seems to take a very long time when using lots of threads. Interrupting with gdb indicates that most threads are stuck in __lll_unlock_wake() which is called from pthread_mutex_unlock() which itself is called (eventually) from xerces_3_1::IconvGNULCPTranscoder::transcode. This transcode method is used in JGeometryXML::SearchParameters::SearchTree to convert the DOMNode name to a char* so it can then be compared to strings from the xpath. Assuming this is the cause of the slow startup, we can avoid having every thread do this repeatedly by walking the tree once while still in the constructor and caching the names of the nodes in a map. The map index would be the DOMNode pointer: map<xercesc::DOMNode*, string> nodeNames; The top part of the SearchTree method has an example of code that could be modified to make a simple tree-walker. The 3 lines near the top of SearchTree where transcode is called would need to be replaced by accessing the map. | ||||
Steps To Reproduce | |||||
Additional Information | - The map should be filled at constructor time and then not modified. This should allow it to be accessed by multiple threads without a mutex lock - The transcode method is called from other routines so it should be checked if these can also be replaced by accessing the cache | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-02-13 08:17 | davidl | New Issue | |||
2013-03-01 16:08 | davidl | Note Added: 0000462 | |||
2013-03-01 16:08 | davidl | Status | new => resolved | ||
2013-03-01 16:08 | davidl | Resolution | open => fixed | ||
2013-03-01 16:08 | davidl | Assigned To | => davidl |
Notes | |||||
|
|||||
|
|