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

Run type checker for interactions without unrelated defs #232

Merged
merged 4 commits into from
Oct 4, 2020

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Oct 3, 2020

Type checking of a def in Steep is independent of other defs. We can just stop type checking for other defs for faster response on hover or completions.

class Foo
  def foo
    1+"     # Assume user triggers completion/hover here. 🈁
  end

  def bar
    2+3     # The type checking of this method is not used at all for the completion/hover above.
  end

  def baz
    :xyz    # We can delete these defs. 🔪 
  end
end

The test on my computer resulted in 4 times speedup of completion, from 2 seconds to 0.5 seconds. This is a huge performance improvement that 2 seconds is clearly too slow, but 0.5 seconds would be acceptable.

@soutaro soutaro merged commit d118b5e into master Oct 4, 2020
@soutaro soutaro deleted the interaction-filter branch October 4, 2020 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant