Skip to content
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

VSCode Intellisense slows down with @gluestack-ui/themed imports #2102

Open
1 of 6 tasks
DavidAmyot opened this issue Apr 29, 2024 · 7 comments
Open
1 of 6 tasks

VSCode Intellisense slows down with @gluestack-ui/themed imports #2102

DavidAmyot opened this issue Apr 29, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@DavidAmyot
Copy link

Description

I expect the @gluestack-ui/themed imports to not impact VSCode Intellisense performance.

CodeSandbox/Snack link

No response

Steps to reproduce

  1. Have some imports such as import { Box, Fab, FlatList, Heading, Text } from "@gluestack-ui/themed";
  2. Make a typo somewhere to trigger an error.
  3. Hover on where you made the typo and wait for it to show there's an error.
  4. Remove the typo, comment out the @gluestack-ui/themed imports and repeat step 2 and 3.
  5. Notice that the Intellisense is much faster.

gluestack-ui Version

latest

Platform

  • Expo
  • React Native CLI
  • Next
  • Web
  • Android
  • iOS

Other Platform

No response

Additional Information

Tagging devs from previous thread: @surajahmed @ankit-tailor


Related prs

Related closed PR I made (unresolved): #1976
Another related closed PR: #903


Diagnostics with Gluestack:

"@gluestack-style/react": "^1.0.53",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "^1.1.22",

Files:             1890
Lines:           241725
Identifiers:     331450
Symbols:         992031
Types:           130308
Instantiations: 5875268
Memory used:    778107K
I/O read:         0.05s
I/O write:        0.00s
Parse time:       0.79s
Bind time:        0.21s
Check time:      32.26s
Emit time:        0.00s
Total time:      33.26s

Diagnostics without Gluestack:

Files:             1455
Lines:           225476
Identifiers:     302281
Symbols:         229877
Types:            37342
Instantiations:  163721
Memory used:    339399K
I/O read:         0.04s
I/O write:        0.00s
Parse time:       0.62s
Bind time:        0.19s
Check time:       0.51s
Emit time:        0.00s
Total time:       1.31s

Issue

Sometimes it's so slow I have to run the Reload Window command from the command palette on VSCode.

There seems to be a problem with Gluestack and typescript, do you not have those issues on your end @ankit-tailor ? Are your tsc diagnostics fast?

My previous issue here was closed, but the problem is still existing.

Demo video:
https://github.com/gluestack/gluestack-ui/assets/60398892/e972600b-e3d4-49aa-9830-8a1ab2ca51c0

@DavidAmyot DavidAmyot added the bug Something isn't working label Apr 29, 2024
@MatheusAVZ
Copy link

MatheusAVZ commented May 6, 2024

Hey, i have the same problem, the VSCode Intellisense slows down with @gluestack-ui/themed imports

  • "@gluestack-style/react": "latest",
  • "@gluestack-ui/config": "latest",
  • "@gluestack-ui/themed": "latest",

Platform

  • Expo
  • React Native CLI
  • Next
  • Web
  • Android
  • iOS

@ankit-tailor
Copy link
Collaborator

ankit-tailor commented May 7, 2024

Can you try the latest versions of @gluestack-style/react and @gluestack-ui/themed? Also let me know the diagnostics after the update. It has reduce for me.

@DavidAmyot
Copy link
Author

Can you try the latest versions of @gluestack-style/react and @gluestack-ui/themed? Also let me know the diagnostics after the update. It has reduce for me.

No, it did not get better.

Before with my current version:

"@gluestack-style/react": "^1.0.54",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "^1.1.22",

Files:             1903
Lines:           242215
Identifiers:     332356
Symbols:         976070
Types:           130501
Instantiations: 5812682
Memory used:    769854K
I/O read:         0.05s
I/O write:        0.00s
Parse time:       0.78s
Bind time:        0.21s
Check time:      29.92s
Emit time:        0.00s
Total time:      30.92s

After updating to latest:

"@gluestack-style/react": "^1.0.56",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "^1.1.24",

Files:             1902
Lines:           242345
Identifiers:     332238
Symbols:         969236
Types:            57002
Instantiations: 4413032
Memory used:    725270K
I/O read:         0.12s
I/O write:        0.00s
Parse time:       0.86s
Bind time:        0.21s
Check time:      29.43s
Emit time:        0.00s
Total time:      30.50s

@ankit-tailor This is 30 seconds for running the diagnostics.. In another project we have for our react frontend website with mui that has twice the amount of files it takes 1.67s. From what I can see from the diagnostics, the amount of types and instantiations is immense compared to if I don't have gluestack installed. Could it be because of some kind of over usage of generic types?

I'm at the point where in our code when I make changes in a file that has gluestack imports I just use the reload window command with vscode instead of waiting because the intellisense is way too slow.

@huix9527
Copy link

huix9527 commented May 8, 2024

Similar issue, tsserver gets very slow after importing gluestack.
"@gluestack-style/react": "^1.0.52",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "^1.1.22",

npx tsc --diagnostics --noEmit
Files: 1298
Lines: 179610
Identifiers: 164305
Symbols: 809868
Types: 136352
Instantiations: 4853127
Memory used: 628113K
I/O read: 0.18s
I/O write: 0.00s
Parse time: 0.81s
Bind time: 0.21s
Check time: 17.78s
Emit time: 0.00s
Total time: 18.81s

@DavidAmyot
Copy link
Author

@ankit-tailor Any update on this? Anyone else in the gluestack team has this issue?

@ankit-tailor
Copy link
Collaborator

ankit-tailor commented May 23, 2024

Hi Everyone, we are working on it to fix it ASAP. Thanks for your patience.

@DavidAmyot
Copy link
Author

@ankit-tailor Thank you very much, if you need me to test with the diagnostics afterwards, please don't hesitate to tag me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants