Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranking: Enhance performance with many items #8108

Closed
mikeamelin opened this issue Apr 12, 2024 · 2 comments
Closed

Ranking: Enhance performance with many items #8108

mikeamelin opened this issue Apr 12, 2024 · 2 comments

Comments

@mikeamelin
Copy link

mikeamelin commented Apr 12, 2024

~ 200 items.
Drag-n-drop is too slow.

Screen.Recording.2024-04-12.at.11.44.56.mov
@mikeamelin mikeamelin self-assigned this Apr 12, 2024
andrewtelnov added a commit that referenced this issue Apr 12, 2024
@dmitry-kurmanov dmitry-kurmanov self-assigned this Apr 12, 2024
@RomanTsukanov RomanTsukanov changed the title Ranking performance issue. Ranking: Enhance performance with a large number of items Apr 16, 2024
@RomanTsukanov RomanTsukanov changed the title Ranking: Enhance performance with a large number of items Ranking: Enhance performance with many items Apr 16, 2024
@OlgaLarina OlgaLarina added this to the v1.9.139 milestone Apr 17, 2024
@mikeamelin
Copy link
Author

Looks like the issue is still here.

@mikeamelin mikeamelin reopened this Apr 18, 2024
@tsv2013
Copy link
Member

tsv2013 commented Apr 24, 2024

The issue is in survey-knockoutui only - in drag drop helper:

  protected afterDragOver(dropTargetNode: HTMLElement): void {
    const choices = this.parentElement.rankingChoices;
    const dropTargetIndex = choices.indexOf(this.dropTarget);
    const draggedElementIndex = choices.indexOf(this.draggedElement);

    choices.splice(draggedElementIndex, 1);
    choices.splice(dropTargetIndex, 0, this.draggedElement);
    this.parentElement.setPropertyValue("rankingChoices", choices); // <- Here we assign all the question that triggers whole list re-rendering in KO

We decided not to fis it and use react version on our site. Probably get rid of KO support in v2.0 and use react+preact instead.

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

No branches or pull requests

6 participants