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

Iframe lazy loading #2790

Merged
merged 6 commits into from
Feb 4, 2022
Merged

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Feb 4, 2022

What do these changes do?

This PR makes the frontend nodes connect to their dynamic service's iframes on demand.

When opening studies with many dynamic services, all the iframes were connected and opened right away, creating hundreds of parallel requests, overloading the backend and the frontend. With these changes, dynamic services will be started, the /retrieve endpoint called, BUT the iframe will not be loaded until the user opens it.

Before:
beforeNetwork

After:
afterNetwork

Related issue/s

related to #2785

How to test

Checklist

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #2790 (fb5929b) into master (4fe88ae) will decrease coverage by 0.0%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2790     +/-   ##
========================================
- Coverage    78.9%   78.8%   -0.1%     
========================================
  Files         670     670             
  Lines       27186   27186             
  Branches     2669    2669             
========================================
- Hits        21459   21448     -11     
- Misses       4971    4981     +10     
- Partials      756     757      +1     
Flag Coverage Δ
integrationtests 65.9% <ø> (+<0.1%) ⬆️
unittests 74.4% <ø> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/simcore_service_catalog/core/background_tasks.py 68.0% <0.0%> (-13.9%) ⬇️
...imcore_service_catalog/db/repositories/projects.py 41.6% <0.0%> (-12.5%) ⬇️
...simcore_service_webserver/projects/project_lock.py 94.7% <0.0%> (-5.3%) ⬇️
...ore_service_director_v2/api/routes/computations.py 78.6% <0.0%> (-1.8%) ⬇️
...car/src/simcore_service_dask_sidecar/dask_utils.py 90.7% <0.0%> (-1.1%) ⬇️
.../director/src/simcore_service_director/producer.py 61.7% <0.0%> (+0.2%) ⬆️
...ervices/storage/src/simcore_service_storage/dsm.py 74.0% <0.0%> (+0.6%) ⬆️
...ce_webserver/resource_manager/garbage_collector.py 73.5% <0.0%> (+0.8%) ⬆️
...ce_webserver/resource_manager/websocket_manager.py 97.3% <0.0%> (+4.0%) ⬆️

@odeimaiz odeimaiz changed the title WIP: Connect to dynamic service's iframe on demand WIP: Iframe lazy loading Feb 4, 2022
@odeimaiz odeimaiz self-assigned this Feb 4, 2022
@odeimaiz odeimaiz added the a:frontend issue affecting the front-end (area group) label Feb 4, 2022
@odeimaiz odeimaiz marked this pull request as ready for review February 4, 2022 13:58
@odeimaiz odeimaiz changed the title WIP: Iframe lazy loading Iframe lazy loading Feb 4, 2022
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

beyond greatness

@odeimaiz odeimaiz added this to the Rudolph+1 milestone Feb 4, 2022
@odeimaiz odeimaiz merged commit 754cd26 into ITISFoundation:master Feb 4, 2022
@odeimaiz odeimaiz deleted the feature/lazy-dy-connect branch February 4, 2022 15:08
@KZzizzle
Copy link
Contributor

KZzizzle commented Feb 4, 2022

super cool, thanks for the notice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants