MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000302JANAFeature Requestpublic2013-02-13 08:172013-03-01 16:08
Reporterdavidl 
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000302: Cache XML node names to speed up JGeometryXML::Get()
DescriptionStartup 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.
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
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000462)
davidl (administrator)
2013-03-01 16:08

This went in revision 1223 and will appear in jana 0.0.6

The fix described in the "Additional Information" was implemented.

Some initial testing on ifarm12s01 indicated there might be a bug with this, but the same issue has not been seen on Mac OS X. Hopefully, the CUE problems were related to stale files and will go away with a fresh build of JANA and sim-recon. For now, I am resolving this issue and will re-opne later if the problem has not gone away.

- 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


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker