Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/FireMonkey/Shapes    [ Add a report in this area ]  
Report #:  134604   Status: Resolved
AddObject is too slow
Project:  C++Builder Build #:  Windows 7.6.1
Version:    20.1 Submitted By:   Jeb Gaither
Report Type:  Basic functionality failure Date Reported:  10/30/2015 10:12:28 AM
Severity:    Serious / Highly visible problem Last Updated: 12/3/2015 2:50:10 AM
Platform:    All versions Internal Tracking #:   72439
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
From internet serach, this appears to be a known problem.

The more pointers one adds to an object the longer it takes.
Steps to Reproduce:
Code Fragment should be sufficient:

In a loop:
TRectangle *aRectangle;

aRectangle = new TRectangle(Owner);


//Draw Rectangel info commented out for test purposrs

It takes  ~17 seconds for the 1st 1000 rectangles
It takes  ~35 seconds for the 2nd 1000 rectangles
It takes  ~57 seconds for the 3rd 1000 rectangles
It takes  ~86 seconds for the 4th 1000 rectangles
It takes  ~97 seconds for the 5th 1000 rectangles
It takes  ~118 seconds for the 6th 1000 rectangles
It takes  ~137 seconds for the 7th 1000 rectangles
It takes  ~159 seconds for the 8th 1000 rectangles
It takes  ~177 seconds for the 9th 1000 rectangles
It takes  ~202 seconds for the 9th 1000 rectangles

Or 17 seconds to do 1000 rectangles & over 17 minutwes to do 10,000 rectangles. We tried 20,000 rectangles It took more than 24 hours.

We are using a brand new computer with an Intel i7 processor and 16GB of main memory.

Should it really take this long just to add pointers to a list?

As a second test we commented the AddObject line out and the speed problem was not observed.

We are using XE6, if this problem has been resolved, let us know and we will uopgrade.


Server Response from: ETNACODE01