jquery-treegrid icon indicating copy to clipboard operation
jquery-treegrid copied to clipboard

Big data example

Open pinguin999 opened this issue 9 years ago • 16 comments

The Big data example takes to long to. Chrome and Firefox showing "to long working javascript" errors.

Any ideas how to speed this up? I need 1000+ rows in the android chrome.

pinguin999 avatar Mar 17 '15 08:03 pinguin999

Also with around 800 rows, it would be nice to not block the whole interface while creating the treegrid.

YMA-MDL avatar May 07 '15 13:05 YMA-MDL

I will think what can I do

maxazan avatar May 07 '15 21:05 maxazan

I've got a view with a bit more than 800 rows, and with this change, it reduces from 40s to 5s. Maybe it needs more test but is seems to work fine for me. And maybe it works only with bootstrap as I'm using the "hidden" class. If not using bootstrap, it would need something to handle the visibility but you shouldn't use hide and show in a loop. Let Jquery handle the loop by applying hide and show to a collection.

YMA-MDL avatar May 11 '15 08:05 YMA-MDL

it is not working for me...i have around 400 to 500 rows it is taking around 40sec..please help me out..

sharathtrt avatar May 29 '15 07:05 sharathtrt

you've tried my change?

YMA-MDL avatar May 29 '15 07:05 YMA-MDL

I have the same problem, i have ~1500 rows to show and the treegrid and treeGrid collapse parts are too long and they freeze my browser :

treeGrid: 15861.654ms
collapse: 10863.867ms

throrin19 avatar Jun 02 '15 14:06 throrin19

have you tried my code change suggestion ? https://github.com/YMA-MDL/jquery-treegrid/commit/633cf33392f691c3c8046f4b08324fd2bae503d2

YMA-MDL avatar Jun 02 '15 14:06 YMA-MDL

For your change @YMA-MDL I think we should set that like this :

if ($this.treegrid('isOneOfParentsCollapsed')) {
     $this.addClass('hide');
} else {
     $this.removeClass('hide');
}

Because the show class in Bootstrap show elements as block. And the gain is very small (1s)

throrin19 avatar Jun 02 '15 14:06 throrin19

Strange, it made a very significant change for me. This issue was that the code was iterating on important DOM manipulation where now it's just a class update and Jquery does the rest.

YMA-MDL avatar Jun 02 '15 14:06 YMA-MDL

but that part does not solve the tree-grid initialization. Only the collapse part. I think the modificzation to optimize the code is to rewrittent all of this without jQuery but with pure javascript and frasgments. In my code, if i try to manipulate a large amount of data, i increase the loadTime and reduce this by 10 only with fragment and javascript native DOM elements. jQuery is heavy and too resource hungry to manipulate large amount of data

throrin19 avatar Jun 02 '15 14:06 throrin19

@YMA-MDL - for what it's worth, integration with this script http://nexts.github.io/Clusterize.js/ would likely solve the big data pains and increase your scripts outer limits by hundreds of thousands of records. I might investigate this myself once I have some time.

mitchc32 avatar Jan 19 '16 13:01 mitchc32

Good Luck, not sure if it will allow to save nested state. Like you browse a structure, and getting back to it later, the same branches are deployd.

YMA-MDL avatar Jan 21 '16 10:01 YMA-MDL

@YMA-MDL, did you implemented Clusterize? If yes, can you share some sample code, please?

krosoftware avatar Mar 08 '17 07:03 krosoftware

No I did not, but I may come across the same need soon.

YMA-MDL avatar Mar 08 '17 22:03 YMA-MDL

Thank you. I try but it does not worked :(

krosoftware avatar Mar 09 '17 13:03 krosoftware

Also tried to combine the Clusterize, but initializing still stays slow with about 1500 rows. Commit from @YMA-MDL (thanks by the way ;-) ) was applied to the code.

Attached the performance record i did with Chrome Version 61.0.3163.100 (64-bit) for future analyses:

Recorded by Chrome

Parama91 avatar Oct 03 '17 12:10 Parama91