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

Extension causes high cpu load #40

Closed
GreeKatrina opened this issue Apr 16, 2019 · 3 comments
Closed

Extension causes high cpu load #40

GreeKatrina opened this issue Apr 16, 2019 · 3 comments

Comments

@GreeKatrina
Copy link

  • Issue Type: Performance
  • Extension Name: rails link
  • Extension Version: 0.13.0
  • OS Version: Darwin x64 18.2.0
  • VSCode version: 1.33.1

This issue keeps happening while editing ruby code.

bung87.rails-unresponsive.cpuprofile.txt

Screen Shot 2019-04-16 at 4 31 29 PM

@GreeKatrina GreeKatrina changed the title Extension causes high cpu load - Ruby Extension causes high cpu load Apr 16, 2019
@GreeKatrina
Copy link
Author

GreeKatrina commented Apr 16, 2019

The code I was editing looked similar to this:

module Parent
  module Child
    ATTRIBUTES = %w(
      attr_a
      # ...
    ).freeze

    CustomErrorA = Class.new(StandardError)

    def self.foo!(a:, b:, c: Time.zone.now)
      raise CustomErrorA unless b.in?(Bar::Baz::ALL)

      new_foo = a.with_lock do
        raise CustomErrorA if a.date < c
            
        a.create!(
          # ...
        )
      end
    end      
  end
end

It seemed to be tripping up when I was messing with raising the errors. Hope that helps.

@bung87
Copy link
Owner

bung87 commented Apr 17, 2019

thanks for your reporting and details, will check it later.

@bung87
Copy link
Owner

bung87 commented May 4, 2019

see discuss here #19 (comment)

@bung87 bung87 closed this as completed May 4, 2019
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

No branches or pull requests

2 participants