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.

Investigate TypeScript intellisense slowness

See original GitHub issue

Multiple users have reported TypeScript intellisense slowness for Chakra 1.0. We definitely want to make sure the DX for Chakra is excellent, so if this affecting you, please respond with the following information:

  • Project type (next/CRA/etc.)
  • Chakra version
  • OS version
  • IDE+version
  • TypeScript version
  • Paste a copy of your tsconfig.json

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:28 (18 by maintainers)

github_iconTop GitHub Comments

6reactions
segunadebayocommented, Aug 6, 2020

We’ve made good improvements to the types of all components. Expect the TypeScript IntelliSense to be fast after the next rc release.

We’ve also moved most component prop definition from type to interface which is a massive win when it comes to speed of resolving types. All these with the as prop still working well 🥳

Thanks to @ljosberinn for leading the effort.

3reactions
remorsescommented, Jul 27, 2020

The typescript intellisense is based on the typescript language server that tsc itself uses, so we can use the tsc compile time as a metric of intellisense speed.

Looking at the code there are a lot of types that could be optimized

  • instead of using PropsOf to declare the components props type we should declare the props as a concrete type, this way tsc has less code to evaluate
// instead of this
export type AlertTitleProps = PropsOf<typeof chakra.div>

// do this
export type AlertTitleProps = { message: 'string', ... }
export const AlertTitle: FC<AlertTitleProps> = ...
  • remove the use of PropsOf in ChakraComponent and other relative types
Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript intellisense is slow · Issue #45327 - GitHub
I use keyboard shortcut to trigger it. There is still much CPU and memory available but the intellisense is slow.
Read more >
Typescript background compilation is very slow, sometimes ...
Typescript background compilation is very slow, sometimes hangs - Visual Studio Feedback.
Read more >
VScode intellisense very slow when 'node_modules' is present
VScode intelliSense is way too slow when working with a certain TypeScript, NextJs project. The problem seemed to be the node_modules folder ......
Read more >
Troubleshooting Tips for IntelliSense Slowness - C++ Team Blog
Having spent a lot of time helping customers with slow IntelliSense, I have found that their performance issues are almost always related to...
Read more >
Slow typescript intellisense in React Nextjs project - Reddit
Slow typescript intellisense in React Nextjs project · You really should be using an SSD as your primary drive for multiple reasons these...
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