Uh oh!
There was an error while loading. Please reload this page.
Added lazy loading to jupyterlab-plotly - #2260
Conversation
With this change, plotly.js will be loaded on demand. This uses dynamic imports to achieve this. Fixesplotly#1913
pragyagarg642
commented
Mar 11, 2020
@nicolaskruchten Can you please review this? |
nicolaskruchten
commented
Mar 11, 2020
Yes, I will take a look. A couple of questions/concerns though: right now in JupyterLab we need to install both It might be that we need to first merge the two extensions together and then make this change, but I'm not sure. |
pragyagarg642
commented
Mar 19, 2020
@nicolaskruchten I'm working on the changes. |
pragyagarg642
commented
Mar 31, 2020
@nicolaskruchten I've made changes according to your comment. Can you please review this? |
nicolaskruchten
commented
Mar 31, 2020
Thanks for these changes! We're quite busy preparing for the 4.6.0 release of Plotly.py but I will review this during the 4.7.x cycle. |
pragyagarg642
commented
Apr 15, 2020
Hi @nicolaskruchten , as the 4.6.0 release is complete, can you please review this? |
nicolaskruchten
commented
Apr 30, 2020
OK, I've had a chance to take a look at this PR, thanks again for submitting it! The TypeScript doesn't actually compile for me with this PR as-is, but with a few adjustments it does, and sure enough, the bundle is nicely split, loads when needed, deduplicates between the two extensions etc. I'll need to fork this PR to add my changes such that things compile, and then the rest of my team can do some QA on Windows and Linux etc, but just wanted to let you know that unless anything weird crops up, we'll be able to merge this for 4.7. |
nicolaskruchten
commented
May 1, 2020
Update: we need to release 4.7 on Monday to meet some internal deadlines, so I'm bumping this to 4.8, which is only about 10 days away! |
Hi @nicolaskruchten , prefetch option can also be added to this change. With that option, module will be fetched just after the initial page load is completed and when required, module will be loaded from prefetch cache, making it faster. Without this option, it will take time to load. I can update the PR with this change as well. |
nicolaskruchten
commented
May 14, 2020
@pragyagarg642 sure, let's see what prefetching looks like! BTW I had to make these changes #2454 to get your branch to work, if you want to incorporate them... Otherwise TypeScript compilation failed. I should add that in order to merge this, we'll have to make equivalent changes to https://github.com/plotly/jupyterlab-chart-editor as well, as people frequently install that one too, and we want to keep all the bundle-loading logic the same. I might move that code into this repo in the very near future to keep things in sync. I'm sorry it's taking so long to get this merged in! |
ba329de to
e690b1aComparepragyagarg642
commented
May 14, 2020
@nicolaskruchten I updated the branch with required prefetch changes. |
pragyagarg642
commented
Nov 9, 2020
Hi @nicolaskruchten, is there any update on this or is there anything pending on my end? |
nicolaskruchten
commented
Nov 9, 2020
See my comment in #2454 ... the bottleneck here is just my time in being able to QA this to the point where we're willing to roll this change out to all of our users. I'm sorry I haven't been able to find the time but this is potentially quite a risky change. |
nicolaskruchten
commented
May 5, 2021
I do apologize about how this PR was left unattended for so long, but it was superseded by #3142 which was just merged, so the functionality will make it into the next version of the library. |
With this change, plotly.js will be loaded on demand. This uses dynamic
imports to achieve this.
Fixes#1913