Hello Boki,
I have a grid with ~ 60 columns and ~ 40000 rows. What is the fastest way to clear all rows? Calling the ClearRows method takes ~ 40 seconds with one CPU core fully utilized. Is there a better way to clearing the entire grid?
The problem is not only clearing all rows, but I guess in generally freeing memory of cells/rows, because e.g. when closing/freeing a TFrame instance with a NextGrid on it, this takes awfully long.
Any ideas are much appreciated.
TNextGrid.ClearRows very slow
Started by Thomas Steinmaurer, Feb 19 2014 10:54 PM
8 replies to this topic
#1
Posted 19 February 2014 - 10:54 PM
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#2
Posted 21 February 2014 - 11:52 PM
Hello Thomas,
Hm. Delay must exist, but it seems that this is quite long.
Can you tell me do you have used BeginUpdate/EndUpdate (but this should not have impact, but maybe).
Hm. Delay must exist, but it seems that this is quite long.
Can you tell me do you have used BeginUpdate/EndUpdate (but this should not have impact, but maybe).
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 22 February 2014 - 10:51 PM
Of course, I'm using a BeginUpdate/EndUpdate block.
VMWare 10 Workstation seems to be the problem. I'm running my dev environment in VMWare. Clearing a grid with ~ 10000 rows while running the executable in VMWare takes ~ 40 seconds. Running that test on the host directly, clearing is nearly instantaneous.
Ever seen something like that?
Thomas
VMWare 10 Workstation seems to be the problem. I'm running my dev environment in VMWare. Clearing a grid with ~ 10000 rows while running the executable in VMWare takes ~ 40 seconds. Running that test on the host directly, clearing is nearly instantaneous.
Ever seen something like that?
Thomas
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#4
Posted 24 February 2014 - 01:59 AM
Doesn't look to be specific to VMWare, but rather the big difference is when running outside the Delphi IDE or not. When running the mentioned scenario/exe in the Delphi IDE, it is terribly slow. Running the test application outside of Delphi, it is really fast. Any ideas?
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#5
Posted 25 February 2014 - 07:20 PM
Hi Thomas,
Can you tell me which IDE and version of NextGrid (5 or 6) you use?
Maybe I will need to ask Embarcadero for help, or TeamB.
Can you tell me which IDE and version of NextGrid (5 or 6) you use?
Maybe I will need to ask Embarcadero for help, or TeamB.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#6
Posted 25 February 2014 - 10:50 PM
I'm using Delphi 2010 Professional and NextGrid 5. Not sure about the exact build number of NextGrid.
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#7
Posted 28 February 2014 - 05:41 AM
I will need to ask for help on Embarcadero groups. It seems that I have same problem with v6. Do you do any other code than simply adding rows and calling ClearRows?
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#8
Posted 28 February 2014 - 07:35 PM
Boki,
so you can reproduce it? No additional stuff. Simply creating a new empty VCL application, placing a grid on a form, adding e.g. 10.000 rows with 60 text columns and then calling ClearRows. ClearRows happens in a BeginUpdate/EndUpdate block. I can send you a Delphi 2010 demo application if you wish.
so you can reproduce it? No additional stuff. Simply creating a new empty VCL application, placing a grid on a form, adding e.g. 10.000 rows with 60 text columns and then calling ClearRows. ClearRows happens in a BeginUpdate/EndUpdate block. I can send you a Delphi 2010 demo application if you wish.
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#9
Posted 06 March 2014 - 07:05 AM
Hi Thomas,
If you can send, please do. As said, I get same delay in v6 and I have worried that I have do something different than in v5. Most probably is some glitch.
If you can send, please do. As said, I get same delay in v6 and I have worried that I have do something different than in v5. Most probably is some glitch.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users