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

DYN-8045: Fix hanged node search when the user types faster than search #15733

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chubakueno
Copy link
Contributor

@chubakueno chubakueno commented Dec 19, 2024

Purpose

Currently the node search hangs when the user types faster than the time it takes Lucene to provide results because it is searching in the main UI thread. This PR provides a debouncing algorithm and performs searches sequentially outside of the main UI thread for a smoother search experience. Currently there is no support for cancelling previous search tasks in lucenenet so this is a fix around that limitation

Before fix:
2024-12-19 00-33-21

After fix:
2024-12-19 00-35-00

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Prevent node search from hanging during fast typing.

Reviewers

@RobertGlobant20
@QilongTang
@sm6srw

FYIs

@avidit

@chubakueno chubakueno changed the title Fix hanged node search when the user types faster than serach Fix hanged node search when the user types faster than search Dec 19, 2024
@chubakueno chubakueno changed the title Fix hanged node search when the user types faster than search DYN-8045: Fix hanged node search when the user types faster than search Dec 19, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8045

Copy link
Contributor

@sm6srw sm6srw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I would like to know what @QilongTang thinks about it.

@sm6srw sm6srw requested a review from QilongTang December 19, 2024 20:35
@chubakueno
Copy link
Contributor Author

Failed on test DocsAreLoadedFromHostPathBeforeCorePath, but that test never goes through Search or SearchAndUpdateResults, so failure is unrelated.

@mjkkirschner
Copy link
Member

@QilongTang this seems to overlap with #15726 am I getting that right? How do you want to proceed with these two prs?

@mjkkirschner
Copy link
Member

@QilongTang this seems to overlap with #15726 am I getting that right? How do you want to proceed with these two prs?

@QilongTang after taking a look at this I think I prefer the approach in #15726 - it's behind a feature flag, has tests, avoids locks, and I think is more idiomatic.

I don't know if it solves the issue of the hanging search though - @bendikberg can you verify if it fixes this issue?

@chubakueno
Copy link
Contributor Author

chubakueno commented Dec 20, 2024

Improvements in last commit:

  • Implemented performance improviments in node library search (side panel)
  • Fix library search in case the user uses a combination of two or more modifiers (alt+shift,ctrl+shift,etc)
  • Fix library search when user types an empty space
  • In context menu is now immediately confirmable on enter. This will help eliminate artificial hardcoded delays in UI Automation testing.

@QilongTang this seems to overlap with #15726 am I getting that right? How do you want to proceed with these two prs?

@QilongTang after taking a look at this I think I prefer the approach in #15726 - it's behind a feature flag, has tests, avoids locks, and I think is more idiomatic.

I don't know if it solves the issue of the hanging search though - @bendikberg can you verify if it fixes this issue?

Copy link

github-actions bot commented Dec 20, 2024

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

@chubakueno
Copy link
Contributor Author

Added unit tests for debouncing.

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

Successfully merging this pull request may close these issues.

3 participants