question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: what is the performance impact of implementing this in the typing system?

See original GitHub 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:

  • opening your editor, lang server starts, opening a file that uses a FromSchema type or two from other files
  • opening your editor, lang server starts, opening a file with many/all schema’s in your app
  • building your project with tsc

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!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasAribartcommented, Jan 8, 2022

Sorry it took some time but I added a FAQ section with a paragraph on the subject !

Closing this issue !

0reactions
rattrayalexcommented, Jul 13, 2021

Full projects. There haven’t been isolated benchmarks on just schemas.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How much do function calls impact performance?
In a nutshell: function calls may or may not impact performance. ... CFastTimer implementation; system time() is not nearly precise enough.
Read more >
Java: Does primitive type casts performance impact? [duplicate]
A typecast from long to int just ignores the leading 32 bit, so it should be more or less for free. Long (=64...
Read more >
Type system - Wikipedia
Advantages provided by compiler-specified type systems include: Optimization – Static type-checking may provide useful compile-time information. For example, ...
Read more >
What is Performance Testing? - TechTarget
Performance testing is a testing measure that evaluates the speed, responsiveness and stability of a computer, network, software program or device under a ......
Read more >
Performance Testing Types, Steps, Best Practices, and Metrics
Performance testing is a form of software testing that focuses on how a system running the system performs under a particular load.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found