Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 16 MAR 2021 06:05:35AM cmeyer wrote:

I have an eit table with 45,000 rows and 12 columns. After loading the edit table (instant response), then any manipulation of the edit table, like clearing the edit table the edit table becomes unstable and hangs OI.

Smaller amounts of data, all is fine.

I assume there is a limit to the amount of data an edit table can handle.

Any suggestions would be appreciated.

Chris


At 16 MAR 2021 07:14AM Carl Pates wrote:

Hi Chris,

32-bit processes cannot address more than 4GB of memory, but in real terms your program will only ever be able to touch 2GB as the OS reserves the remainder to load system files and whatnot. This means that the sum of memory used in your application is limited to 2GB total.

Internally the EditTable allocates a single block on memory to contain all of it's data - this is basically the size of each row (i.e. total declared length of all columns in a row) multiplied by the number of rows (it also allocates other blocks for formatting as well). If this is extremely large then then it can get unwieldy to manipulate. For example if it needs to increase it's size, then the OS has to provide a new block of contiguous memory from the heap (which may involve compacting it), copy the existing data across to it, and then releasing the original block. This can be a slow operation, especially it you then start factoring in possible disk swapping too.

As you mentioned clearing the table: The problem here is that Set_Property performs an implicit Get_Property operation, even if you don't want the returned data (This is why I wrote Set_Property_Only for v10). So even though you're trying to remove the data it's getting a copy for you that you are just going to throw away!

Some possible suggestions to help are:

1) Review the data length you declare in each column - try not to waste any ( but also be aware that the control will silently truncate any cells that don't fit)

2) Introduce some form of paging so that the data can be split and loaded into blocks

3) Use SendMessage and DTM_RESETDATA to clear the edit table rather than Set_Property:

   equ DTM_RESETDATA$ to 1025

   call SendMessage( hwndEditTable, DTM_RESETDATA$, 0, 0 )

(BTW - you can do this before you use Set_property ARRAY/LIST with the EditTable if you don't want the return the original data)

4) Move to v10 which is a 64-bit application so can handle much larger amounts of data , has Set_Property_Only, and doesn't truncate under-allocated cells.

Carl Pates


At 16 MAR 2021 04:57PM cmeyer wrote:

Thanks Carl for your explanation. I will try a work around to limit the amount of data.

Chris

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/4b1cff8f24797a41becaaa28cff986f0.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1