Issue Details (XML | Word | Printable)

Key: JDNC_INCUBATOR-2
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: rbair
Reporter: a4f686e6
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jdnc-incubator

NameGenerator slow down

Created: 12/Sep/05 12:17 PM   Updated: 12/Sep/05 12:17 PM
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 2
Tags:
Participants: a4f686e6 and rbair


 Description  « Hide

When creating a large dataSet, or multiple dataSets, the generateName(Object
obj) method causes a major slow down. The code that causes this is:

for (int i=0; i<Integer.MAX_VALUE; i++) {
String name = prefix + (i+1);
if (!usedNames.values().contains(name)) { usedNames.put(obj, name); return name; }
}

Therefore when there are a lot of names in the usedNames map, this makes
thousands of calls to .contains(). Hopefully this is enough information to show
the bug.



There are no comments yet on this issue.