Giter Site home page Giter Site logo

Comments (10)

Chriscbr avatar Chriscbr commented on June 5, 2024

I threw in some extra logs to get an idea of where the time's being spent. A few things I noticed, out of the 10 second reload:

  • It seems to take about 3-4 seconds between me saving my file and the simulator's update() method getting called. I'm not sure if this is due to the file watcher being slow, or some other performance issue. (cc @skyrpex)
  • Around 1s is spent in total updating most of the other resources. Some of this could be parallelized with winglang/wing#6151. These ones in particular take a few hundred ms to start:
    • root/Default/Services/imagesBucket/AwsConsoleField/Handler
    • root/Default/Services/imagesBucket/BucketArnField/Handler
    • root/Default/Services/imagesBucket/FileBrowser/delete
    • root/Default/Services/imagesBucket/FileBrowser/list
  • The rest of the time (about 5-6s) is spent starting up root/Default/Service/Service_sim/Service (tsoa.Service).

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

Updated issue description to put more emphasis on changing the ts files (the tsoa source code)

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

The emphasis here should be optimizing the time spent when the tsoa related source code change.

Keep in mind that this is how currently developers are working locally, they change the code and almost instantly (for the time it takes for the tsoa to compile) they are able to test the code.

Maybe we can optimize this flow somehow

from setup-tsoa-hybrid.

staycoolcall911 avatar staycoolcall911 commented on June 5, 2024

@ekeren - do we know how they implemented hot reloading of the TSOA service? We can probably implement the same battle-tested mechanism they've been using

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

@ekeren - do we know how they implemented hot reloading of the TSOA service? We can probably implement the same battle-tested mechanism they've been using

Good question, using nodemon (see TSOA doc https://tsoa-community.github.io/docs/live-reloading.html) is a lot quicker then our current solution.

Anyhow, I'll ask

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

I've talked with the team that is working on this. They don't have a unified way of doing hot reloading.

They are using esbuild to bundle stuff together and then using nodemon

from setup-tsoa-hybrid.

eladcon avatar eladcon commented on June 5, 2024

i think we can start with watching the TS files in the service and not restarting the simulator for those changes

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

i think we can start with watching the TS files in the service and not restarting the simulator for those changes

Keep in mind that you will need to refresh the service httpClient based on any changes in openapi aspec

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

@eladcon have added the option to watch a specific folder for TSOA.
If I use this change, it requires some folder moving around but the result is good enough.

I'll post a video of the experience later today

from setup-tsoa-hybrid.

ekeren avatar ekeren commented on June 5, 2024

The watch is a good enough solution, closing

from setup-tsoa-hybrid.

Related Issues (3)

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.