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

[Notebook] Many network calls generated when a single entry is added #5641

Closed
2 of 7 tasks
unlikelyzero opened this issue Aug 10, 2022 · 13 comments
Closed
2 of 7 tasks
Labels
performance impacts or improves performance severity:critical type:bug
Milestone

Comments

@unlikelyzero
Copy link
Collaborator

Summary

I was noticing that my tag notebook edits were taking a long time to apply in a larger notebook while accessing a viper deployment on the VPN. I opened up the network tab and saw the following

After creating a Notebook with 15 entries, entering the 16th and 17th entries causes
107 network requests which take 4 seconds to resolve.

Steps to Reproduce

  1. Create a notebook with 15 entries
  2. Click the 'To start a new entry, click here or drag and drop any object' to add a new entry (16)
  3. Enter an entry name (test 16)
  4. Repeat steps 2 and 3.
  5. Hit [enter] key

Environment

  • Open MCT Version: 2.0.7
  • Deployment Type: viper/testathon

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

Screen Shot 2022-08-10 at 9 45 41 AM

@unlikelyzero unlikelyzero added type:bug severity:critical performance impacts or improves performance labels Aug 10, 2022
@shefalijoshi
Copy link
Contributor

shefalijoshi commented Aug 10, 2022

The number of _find calls is equal to the number of entries. A search for Annotations is done for each notebook entry with each network call.
image

@scottbell
Copy link
Contributor

We could optimize this and look into asking for all tags for a notebook instead of per entry?

@shefalijoshi
Copy link
Contributor

Yes, but there's also another issue - when a notebook get synced by CouchDB, the domain object get updated, which triggers a computation for annotationQuery (in NotebookEntry.vue) even if there is no change to the entry or tags.
This computation change then triggers another query to get tags. This is the real optimization we need to do. If there is no change in the entry/tags, we should not re-request tags for that entry.

@scottbell
Copy link
Contributor

In that case, we’ll need a way to know that tags haven’t changed.

@scottbell
Copy link
Contributor

scottbell commented Sep 2, 2022

I've reduced the network calls to a constant. The network calls are also no longer growing with the length of entries.

@ozyx
Copy link
Member

ozyx commented Sep 30, 2022

Closed by #5763

@ozyx ozyx closed this as completed Sep 30, 2022
@ozyx
Copy link
Member

ozyx commented Sep 30, 2022

Verified Testathon 09/30/22:

  • Only 2 network requests each were generated when adding entry 16 and entry 17

@unlikelyzero
Copy link
Collaborator Author

Please retest with notebook tagging

@ozyx
Copy link
Member

ozyx commented Oct 4, 2022

Need better verification instructions before we sign off on this. Testing notes:

Testathon 10/4/22:

Seeing 9 requests per tag. Seems to be the same number no matter how many entries or tags are present on the notebook page.

@ozyx ozyx added the needs:test instructions Missing testing notes label Oct 4, 2022
@akhenry akhenry assigned scottbell and unassigned ozyx Oct 4, 2022
@akhenry
Copy link
Contributor

akhenry commented Oct 4, 2022

@scottbell What would constitute verification of this fix? how many requests should we now expect?

@scottbell
Copy link
Contributor

scottbell commented Oct 4, 2022

@ozyx @akhenry Per the e2e tests, 9-12 sounds about right:
https://github.com/nasa/openmct/blob/master/e2e/tests/functional/plugins/notebook/notebookWithCouchDB.e2e.spec.js#L83
the main thing to test is that it’s not increasing per entry as it once was.

@akhenry
Copy link
Contributor

akhenry commented Oct 6, 2022

@ozyx to test

@ozyx
Copy link
Member

ozyx commented Oct 6, 2022

Verified Testathon 10/6/22.

Adding entries and tags always makes the same number of requests. ~2 for adding/removing entries, and ~9 for adding tags, ~4 for removing tags.. The number of network requests does NOT increase as the number of entries / tags increase.

@akhenry akhenry removed the unverified label Oct 6, 2022
@unlikelyzero unlikelyzero removed the needs:test instructions Missing testing notes label Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance impacts or improves performance severity:critical type:bug
Projects
None yet
Development

No branches or pull requests

5 participants