Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Tablesaw choking with large data sets? #374

Closed
seyfer opened this issue Apr 26, 2019 · 3 comments
Closed

Tablesaw choking with large data sets? #374

seyfer opened this issue Apr 26, 2019 · 3 comments

Comments

@seyfer
Copy link

seyfer commented Apr 26, 2019

Chrome and Firefox just getting stuck with datasets more than 1000+ rows.

We have faced the issue and limited our tables to 200 rows.
We use tablesorter https://github.com/Mottie/tablesorter without any widgets. And also we use tablesaw https://github.com/filamentgroup/tablesaw lib on the same table.

After debugging we think it might be connected somehow to this issue, is it possible?
jquery/sizzle#342

UPD. seems like it is more about tablesaw,
Here is a stack trace

Error: Script terminated by timeout at:
./node_modules/jquery/dist/jquery.js/</Sizzle</Sizzle.uniqueSort@http://host.loc/build/backend/vendors~js/base~js/bbc~js/cluster-dashboard~js/competition~js/dashboard~js/distribution~js/external-~8997b080.js:1566:2
add@http://host.loc/build/backend/vendors~js/base~js/bbc~js/cluster-dashboard~js/competition~js/dashboard~js/distribution~js/external-~8997b080.js:3104:4
./node_modules/tablesaw/dist/tablesaw.jquery.js/</</Table.prototype.isCellInColumn@http://host.loc/build/backend/vendors~js/bbc.js:9517:5

As you can see, somewhere Sizzle.uniqueSort was used, and it causes the problem.

@seyfer
Copy link
Author

seyfer commented Apr 29, 2019

This is the exact line which gives the problem.
tablesaw/dist/dependencies/jquery.js:2560

// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					Sizzle.uniqueSort( results );
				}

@gibson042
Copy link

jquery/sizzle#342 (comment)

that call to uniqueSort is specific to use of multiple positional matchers like :first, :last, :even, :odd, :eq(N), :lt(N), and :gt(N), all of which are ill-advised and deprecated. I recommend rewriting the logic to avoid using those nonstandard selectors, or at the very least to using no more than one at a time, in which case the slow sorting will no longer be necessary.

@seyfer
Copy link
Author

seyfer commented Apr 29, 2019

@gibson042 thank you. I hope this will help maintainers to fix it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants