dhtmlXGrid caching

We are using 100,000+ records into grid. At present we are using smart rendering with 100 records as buffer size. The application act very fast. But the issue is with caching. If the user stay with grid for more time and visit lot of screens(scrolling) the system start to respond slow and eventually the IE is non-responsive. We identify this is due to the caching of already visited data. Is there any way to set the cache size or avoid caching ?
Thanks in adavnce.

You can use preventIECaching(mode)
docs.dhtmlx.com/doku.php?id=dhtm … tiecaching

Thanks Olga,
But it seems to be not resolving the issue. The issue is basically with the Number of DOM elements created with scrolling. For 1000 records it is creating more than 20000 DOM elements. (Use Firbug console and document.getElementsByTagName(’*’).length command for count) This elements are not cleared and if the user start to stay more time with grid screens and scroll into more screens the browser will die. I just wonder, If there is no way to clear the unwanted DOM elements of the previous screens then how the claim of millions of records is true ?

Basically you can call


To remove from DOM all not visible rows.

var y0 = 0; grid.attachEvent("onScroll", function(x,y){ if (Math.abs(y0-y) > 20000){ //1000 rows y0 = y; this._reset_view(); this.objBox.scrollTop = y; } return true; })

Thanks Stanislav.
It solved one of the issue I mentioned. Now the number of DOM elements are in control. Thank you.
The other part of the story, that is memory usage is still higher.
We were loading 65K records through dynamic loading. 15K record of blocks per dynamic loading.
Interesting findings :

  1. Once loaded the JSON objects are cached and no need to reload records from server. So our expectation is that the 65K records will be around 20MB of data. So all these data in the system memory. Its fine as it skips further server call.
  2. But the data buffering or smart rendering still causing high memory usage. Scrolling up and down some time is making the IE process memory usage to 800MB+. (I tried up to that only). It seems to be like a memory leakage.
    Now ,
  3. Is there any way for reducing the memory consumption ?
  4. Instead of 65K records buffering, Is there any option for limited buffering like few thousand records only buffered? (It is acceptable to reload from the server again.)
  5. Is there any memory clean up process by DHTMLx API, if we identify heavy memory usage?
  1. Is there any way for reducing the memory consumption ?
    IE will not release xml objects, which was created during loading, until page reload.
    ( event if you are loading json, it is done through xmlhttprequest )
    So, more loading - more memory consumption without chances to free memory until page refreshing.
    ( basically there are some other memory issues, but they are much smaller in comparison with above one )
  1. Instead of 65K records buffering, Is there any option for limited buffering
    Grid has inner structure


that is array ( row index -> xml or html element of row ), basically nullifying values in it will empty client side cache and force data reloading. It will decrease memory usage , but still XML objects will not be removed from memory.

Is there any memory clean up process by DHTMLx API,
object has grid.destructor() method, so in worst case you can call it and reinit grid ( destructor will nullify all inner data links, which must cause garbage collecting and memory releasing )


I tried setting the rowsBuffer items to null but this does not seem to let the server force reload data. Any idea why?


I also have the same problem.I want the grid to load the data dynamically from server on each page request .Previous data that was loaded is being cached,I want to clear buffer every time the grid loads a page.Any Suggestions.

Unfortunately this functionality is not supported at dhtmlxGrid