Comments (10)
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.
Updated issue description to put more emphasis on changing the ts files (the tsoa source code)
from setup-tsoa-hybrid.
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.
@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 - 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.
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.
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.
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.
@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.
The watch is a good enough solution, closing
from setup-tsoa-hybrid.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-tsoa-hybrid.