iVis-at-Bilkent/newt

Spinner not working consistently for large graphs

hasanbalci opened this issue · 10 comments

We use spinner to show the process of both file loading and layout. Ideally, spinner starts when we start loading a file or applying layout and it stops when file has loaded or layout has finished. However, start and stop times of the spinner are currently not correct especially for the large graphs.

For example, while we are loading the below file (please delete .txt before loading), spinner works correctly. However, when we click on the layout button, spinner starts very late and stops at correct time.

central_plant_metabolism_doubled.nwt.txt

Another example is while trying to load a large sbml file from URL. When we try to open the following link, spinner stops after some time, before map appears in the canvas.

https://web.newteditor.org/?URL=https://www.ebi.ac.uk/biomodels/model/download/MODEL1108160000.2?filename=MODEL1108160000_url.xml&inferNestingOnLoad=true&applyLayoutOnURL=true

I think this is ok now, so I'm closing the issue.

Can we perhaps put a notice (below the spinner?) that says something like "This might take a while. Please wait..." in case it takes longer than 30 seconds?

The spinner starts immediately when loading an SBML file to Newt through URL. When loading the file, the file size is checked. If the size is more than 250KB, then the text "Take a sip of your coffee while you wait" is shown too. Otherwise, only the spinner is shown.

Thanks @SelbiEreshova seems to work fine. Please:

  • change the text message to include "..." at the end
  • then transfer this to the related master branch(es)
  • let @hasanbalci know so he can do a quick patch release

Probably after these changes, now when there is no graph element and we click on the layout button, spinner is started but never stopped.

Probably after these changes, now when there is no graph element and we click on the layout button, spinner is started but never stopped.

@hasanbalci I pushed a change to address this. You can check this on the internal server.

@umut-er Can you try moving var cy = chiseInstance.getCy(); above if statement? Otherwise, if statement may not check the correct cy instance. Also, please apply same fix for perform-static-layout below.

Should be good to go.

@umut-er I think you submitted the changes to your local repo, not here.

Yes sorry it is here now: b09f105.