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

[Bug]: DwC Occurrence Importer settings modal lags on open when many namespaces set #2834

Closed
1 of 4 tasks
LordFlashmeow opened this issue Feb 28, 2022 · 7 comments
Closed
1 of 4 tasks
Labels
bug An existing function is broken.

Comments

@LordFlashmeow
Copy link
Contributor

LordFlashmeow commented Feb 28, 2022

Steps to reproduce the bug

When opening the DWC Occurrence Importer settings modal, each row in the list makes a namespace api query (if it is set/not blank).
If multiple rows are set to the same namespace, it generates duplicate queries which causes significant lag.

Ex: sandwich project Feb Antweb Import in the specimens import, it takes 10+ seconds to open the modal after clicking the button. (It also opens at the bottom of the list instead of the top)

Screenshot

No response

Expected behavior

No response

Additional Screenshots

No response

Environment

  • Development (native)
  • Development (docker)
  • Sandbox
  • Production

Sandbox Used

sandwich

Version

all versions

Browser Used

No response

@LordFlashmeow LordFlashmeow added the bug An existing function is broken. label Feb 28, 2022
@LocoDelAssembly
Copy link
Contributor

A bit hard to test because I'd need to interrupt your import. However closing the modal and opening settings seemed show up the modal in less than 2 seconds.

Can you reproduce the lag consistently?

@LordFlashmeow
Copy link
Contributor Author

You can test it while the import's in progress, just hide the import dialog.

I'm getting it consistently, and I encountered it when running TW from my machine as well.

@LocoDelAssembly
Copy link
Contributor

Can I stop the import a bit and resume right after I test this?

@LordFlashmeow
Copy link
Contributor Author

LordFlashmeow commented Feb 28, 2022

Go for it. I'm pretty sure the problem is that each Row in Vue runs their own query instead of using something centralized that caches the responses.

@LocoDelAssembly
Copy link
Contributor

Please close any of your tabs, otherwise import starts again (need to fix this).

@LordFlashmeow
Copy link
Contributor Author

Done

@LocoDelAssembly
Copy link
Contributor

LocoDelAssembly commented Feb 28, 2022

It shows me the modal in less than 3 seconds. However I notice it repeatedly requests the same namespaces multiple times so it is not caching there.

image

(Pink timing is blocked in browser, not delay at backend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing function is broken.
Projects
None yet
Development

No branches or pull requests

2 participants