Bug 224381 - Inefficient AbstractLookup using collection.toArray()
Inefficient AbstractLookup using collection.toArray()
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Lookup
7.2
All All
: P2 (vote)
: 7.3
Assigned To: Jaroslav Tulach
issues@platform
: 73_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-02 13:00 UTC by Tomas Zezula
Modified: 2013-01-14 19:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
snapshot (488.10 KB, application/octet-stream)
2013-01-02 13:00 UTC, Tomas Zezula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2013-01-02 13:00:07 UTC
Created attachment 129818 [details]
snapshot

One call to InstanceContent.add() causes nearly 1000 calls of Class.getComponentType() taking 16s.
Comment 1 Jaroslav Tulach 2013-01-03 13:54:08 UTC
Having steps to reproduce or at least description of your use-case would help you justify the currently assigned priority.
Comment 2 Tomas Zezula 2013-01-03 14:42:04 UTC
No steps to reproduce just the snapshot from slowness.
I've entered it with high priority as a single IC.add() took 16s.
Feel free to decrease the priority.
Comment 3 Jaroslav Tulach 2013-01-10 08:38:10 UTC
You are right, the reflection is completely unnecessary. Eliminated in ergonomics#4403733f88c5 Thanks for pointing that out.
Comment 4 Quality Engineering 2013-01-11 03:01:58 UTC
Integrated into 'main-golden', will be available in build *201301110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4403733f88c5
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #224381: Eliminating need for reflection by passing in properly sized array
Comment 5 Marian Mirilovic 2013-01-11 11:29:22 UTC
This hasn't been fixed in 7.3 yet, if you want to do so, please integrate into release73 branch.
Comment 6 Jaroslav Tulach 2013-01-14 10:02:10 UTC
Merged as

changeset:   b13bd4b8b257
branch:      release73
Comment 7 Quality Engineering 2013-01-14 19:09:43 UTC
Integrated into 'releases', will be available in build *201301141642* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/4403733f88c5
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #224381: Eliminating need for reflection by passing in properly sized array


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo