New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: what is the performance impact of implementing this in the typing system? #31
Comments
PS: I had some bad experiences with complex typings impacting the editing experience in the past with for example styled-components. Not sure if still the case, but it made editing react code sluggish (in vscode back then), switching to an alternative lib fixed that. With so little control and insight in what's going on with the TS server in the background very complex third-party typings can be a bit scary. |
You may find what you're looking for here: #20 (Perhaps some summary of that discussion could be added to the readme?) My overall impression is that the perf hit scales with the size of a given json schema – having a lot of schemas shouldn't be too much of an issue, but having really large/complex ones might be. |
Thanks for your answer @rattrayalex Yes, I've been very busy on other subjects lately, but I'm definitely going to add those points to the README. @marcelbeumer I've used this lib on a large project with 200+ small/medium schemas (50 to 100 lines). The IDE experience was still very smooth.
|
Thanks @ThomasAribart and @rattrayalex. Those metrics are they just for the schema part (by testing difference with and without schemas) or are those for full project code? |
Full projects. There haven't been isolated benchmarks on just schemas. |
Sorry it took some time but I added a FAQ section with a paragraph on the subject ! Closing this issue ! |
Hi @ThomasAribart, thanks for your awesome work,
json-schema-to-ts
looks very interesting!I was wondering though, what performance impact can we expect implementing this in the typing system? A lot of TS logic needs to happen on the fly for inferring the schema TS types, and my worry is that when codebases grow, the TypeScript language server might take a long time to startup, and we'll start feeling in in our editing experience. But maybe it's all super fast and little work compared to all other things TS has to do on a codebase.
I imagine a few use cases where this matters:
FromSchema
type or two from other filestsc
I'm now using a (more complex) build time solution, but if
json-schema-to-ts
has an insignificant perf impact it would make things easier and more elegant. Curious about your thoughts on this!The text was updated successfully, but these errors were encountered: