Bug 228511 - [model] WSDLParser creates lots of little objects when tracking location
Summary: [model] WSDLParser creates lots of little objects when tracking location
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsdl (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Valentin Baciu CLA
QA Contact: Valentin Baciu CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2008-04-23 16:29 EDT by Valentin Baciu CLA
Modified: 2008-04-24 17:18 EDT (History)
0 users

See Also:


Attachments
Proposed patch (8.46 KB, patch)
2008-04-23 21:49 EDT, Valentin Baciu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Baciu CLA 2008-04-23 16:29:15 EDT
A recent profiling session yielded some interesting results. It looks as if the
WSDL parser's (WSDLParser) user data map, which gets populated when instructing
the WSDL resource to track location, can get pretty big when loading lots of
WSDL documents or just a few large WSDL documents in the same resource set.

So I looked at the way WSDLParser tracks location. The map of Node -> map of
string->Integer seems intuitively to be a bit expensive memory wise. All those
user data hash maps are created with the default size/load (16 entries for
example) even though they will normally only hold maximum 4 entries. Perhaps
this could be changed to something more economical memory-wise like Node ->
some object with 4 ints. We'd avoid creating lots of HashMap#Entry and Integer
objects and spare some memory.
Comment 1 Valentin Baciu CLA 2008-04-23 21:49:30 EDT
Created attachment 97343 [details]
Proposed patch
Comment 2 Valentin Baciu CLA 2008-04-23 21:49:52 EDT
Patch committed and released for WTP 3.0 M7 builds > v200804240246 (UTC)
Comment 3 Valentin Baciu CLA 2008-04-24 17:18:18 EDT
Verified with I20080424115353. Closing.