Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Separate imported and plain variables - #1051

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 44 commits into
microsoft:masterfrom
MikhailArkhipov:impvar
May 7, 2019
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 44 commits into
microsoft:masterfrom
MikhailArkhipov:impvar

Conversation

@MikhailArkhipov

@MikhailArkhipov Mikhail Arkhipov (MikhailArkhipov) commented May 6, 2019 •

Copy link
Copy Markdown

We declare a lot of variables. Currently each variable is a LocatedMember which has Parent field. However, only imported items actually use this property, all others have it null. This change is to introduce IImportedMember and ImportedVariable hence reducing size of 90% of the variables in scopes.

In addition, LocatedMember no longer stores MemberType and instead derived classes should override the property and return value specific to the type hence removing another field from use in all types.

Fixes #1053

MikhailArkhipov added 30 commits March 1, 2019 09:51
This reverts commit 7ffc9db.
Comment thread src/LanguageServer/Impl/Sources/ReferenceSource.cs
@MikhailArkhipov
Mikhail Arkhipov (MikhailArkhipov) merged commit cc5cec1 into microsoft:master May 7, 2019
Jake Bailey (jakebailey) pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
* Fix microsoft#668 (partial)

* Tests

* Revert "Tests"

This reverts commit 7ffc9db.

* Exp

* Limit concurrency

* Concurrency limit

* Drop cache after analysis

* Fix regression

* Fix test

* Optimize variable collection

* Clean

* Special type of imported variable

* Merge issues

* Merge fixes

* Fix test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove fields only used in some types from base classes

2 participants