Giter VIP home page Giter VIP logo

Comments (5)

jcheng5 avatar jcheng5 commented on September 28, 2024

Does it take more than 10 seconds for the app to load? If so it’s probably this line, that gives up after 10 seconds:

retryUntilTimeout(10000, () => isPortOpen("127.0.0.1", p))
I think I did it this way because the extension has no way of knowing if the app succeeded or failed to launch, and I didn’t want it to keep waiting on that port forever (imagine that launch window suddenly popping up way down the line).

Maybe it should never time out, but each new attempt to launch should cancel all previous attempts? Or we could simply increase the timeout to something more conservative—10sec is pretty stingy.

from shiny-vscode.

Oscarhg42 avatar Oscarhg42 commented on September 28, 2024

yes, it takes more than 10 seconds to load the dataset and extracting only 10 rows. The thing is that I'm connecting to a databricks server so the connection and loading takes a little bit of time.

One further comment, the app never appears on the right sample browser, it's just stuck after the "INFO" message

from shiny-vscode.

Oscarhg42 avatar Oscarhg42 commented on September 28, 2024

If I restrict the query to only get 10 rows from source instead of having the entire data set, then the query takes less than 10 seconds approx and the app does load

from shiny-vscode.

gadenbuie avatar gadenbuie commented on September 28, 2024

Maybe it should never time out, but each new attempt to launch should cancel all previous attempts? Or we could simply increase the timeout to something more conservative—10sec is pretty stingy.

We close existing Shiny terminals with a new launch attempt (a new click on the Play button, not an auto-reload), which I imagine would have the same effect as cancelling previous attempts, right? In which case, upping the timeout is more reasonable.

We could also do something like wait 15 seconds and then ask the user via a dialog box if they want to keep waiting or kill the app.

from shiny-vscode.

jcheng5 avatar jcheng5 commented on September 28, 2024

@gadenbuie Killing the console would prevent multiple Shiny processes from starting, but I don’t think it will stop openBrowserWhenReady—oooh but maybe that’s the ideal fix. openBrowserWhenReady can be notified or can query whether its owning terminal is still open, and if not, don’t open the browser. What do you think?

from shiny-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.