Page 1 of 1

RecNo is quite slow

Posted: Wed 02 Jul 2008 09:15
by Domenico Mammola
Hi! I'm making some performance tests on the virtual table component. Compared to other in-memory datasets (KbmMemTable and DxMemData) I found that VirtualTable has a lower memory footprint and it's faster in editing and posting but it's much slower while browsing records through the RecNo property.

Will this feature be improved in next releases?

Domenico

Posted: Thu 03 Jul 2008 07:56
by Antaeus
There is no simple ways to optimize this functionality. So it is unlikely that it will be done in the nearest future.
As a possible alternative I can suggest using Locate by ordered dataset:

Code: Select all

  VirtualTable.IndexFieldNames := 'Number';  // perform ordering by a field we need 
  ...
  VirtualTable.Locate('Number', 25, []);
  ...
  VirtualTable.Locate('Number', 12, []);