This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224381 - Inefficient AbstractLookup using collection.toArray()
Summary: Inefficient AbstractLookup using collection.toArray()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


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