[Bug]: `Slot` performance issue
Library
React Components / v9 (@fluentui/react-components)
System Info
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Memory: 17.51 GB / 31.95 GB
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.63)
Internet Explorer: 11.0.19041.1566
npmPackages:
@fluentui/react-components: ^9.2.0 => 9.2.0
@fluentui/react-icons: ^2.0.179 => 2.0.179
Are you reporting Accessibility issue?
no
Reproduction
Repro as you use.
Bug Description
Actual Behavior
Origin in Griffel #198
VS Code can do auto-import when users try to use a module that is not imported. Here comes my problem: even auto-import of React module could happen immediately, but every time I try to auto import the type Slot, I must wait for several seconds. Is this type bigger or more complex than the whole React?
And, after imported Slot, the IntelliSence will also be very slow (loading for seconds). It's not caused by extensions of VS Code, I disabled all extensions, and this problem is remained (better than before, but still bad). Also, I don't think this is a VS Code problem because everything is fine before I imported Slot.
Expected Behavior
A package should not influence editor's behavior.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
We should look into this and confirm repro as a potential dev experience issue using the library. The Slot types are complex, but we shouldn't have it such that it causes a bad experience for devs. Marking Medium priority
Possibly will be improved by the fix to #24707
Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.