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

Poor performance with Spectacle in IntelliJ #18

Closed
ocary opened this issue Feb 26, 2018 · 8 comments
Closed

Poor performance with Spectacle in IntelliJ #18

ocary opened this issue Feb 26, 2018 · 8 comments

Comments

@ocary
Copy link

ocary commented Feb 26, 2018

When using IntelliJ, after installing Gauge Spectacle some edit actions of specs and IntelliJ actions are significantly slowed. Appears to only affect .spec files. Without Spectacle these actions run basically instantly.

Actions that are slowed with Spectacle insalled

  • Click on run icon next to the spec or scenario name to pick run, debug, etc. (Seen to take up to 9 seconds before the context menu appears).
  • Right click on filename to pick options like "close unmodified".
  • In a concept file, right click on filename to pick options like "close unmodified".
  • Click on run icon next to the spec name or scenario name
  • Edit of Spec name. (Takes 3 - 4 seconds for the typed characters to appear)
  • Edit of Scenario name.

These slowdowns are seen on a project that has 6 gauge sub-projects within and overall is decently large. 2000+ specs between the 6 projects. Less severe slowdowns are seen on a much smaller project, but the lag still is very frustrating.

Gauge version

Gauge version: 0.9.7
Commit Hash: bc9784c

Plugins
-------
csharp (0.10.1)
flash (0.0.1)
html-report (4.0.3)
java (0.6.6)
screenshot (0.0.1)
spectacle (0.1.2)
xml-report (0.2.0)


IntelliJ Gauge plugin:   0.3.9

IntelliJ Ultimate 2017.3.4
@nehashri
Copy link
Contributor

@ocary I don't see a significant lag with spectacle installed. However, I would like to clarify a few things so I can try and see when such a lag occurs.

  • Which OS are you working on?
  • When do you see the lag happening? Immediately after opening the project or after running it for some time?
  • When there is a lag, are there a lot of preview pages open in the browser? If so, on an average how many are open?
  • Do you still see this lag after closing all the pages in the browser?

@ocary
Copy link
Author

ocary commented Feb 27, 2018

  • OS: Windows7 Enterprise. Service Pack 1.

  • When: Happens as soon as the project is opened. Further details: I uninstalled the Spectacle plugin, closed all files in IntelliJ and rebooted the machine. I opened the project, opened 1 simple spec file (6 steps in the 1 scenario in the spec) and performance was fine. I installed the Spectacle plugin and immediately saw the lag when trying to do any of the actions specified in the original post. Closing the project and re-opening still has the lag present. Uninstalling the Spectacle plugin from a command line results in the lag going away immediately in IntelliJ.

  • Preview pages: I don't know what you mean by preview pages - therefore I don't think I have any preview pages open.

@nehashri
Copy link
Contributor

@ocary Thanks for reporting this issue.
Spectacle runs every time a preview call is made. This call can be made by clicking on the Browser icon in upper right corner of the editor.
It can also be made by some plugins running in the background. One such plugin I found was LiveEdit plugin. Such plugins try to reload the preview at frequent intervals and hence may start running spectacle multiple times.
If you have any such plugins installed can you try disabling it and see if the same issue occurs.

@ocary
Copy link
Author

ocary commented Feb 28, 2018

I disabled the following and am still seeing the lag:

  • All custom (non-bundled with IntelliJ) plugins except Gauge.
  • HTML Tools
  • Less support
  • QuirksMode
  • Spy-js
  • Thymeleaf
  • W3C Validatiors

All of the above plugins that are bundled with IntelliJ were installed by default. Looking through all the bundled plugins, these were the 6 that looked like they might have something to do with live parsing of files.

Are there any logs I should be looking into to see what is being called?

nehashri pushed a commit to getgauge/Intellij-Plugin that referenced this issue Mar 1, 2018
@nehashri
Copy link
Contributor

nehashri commented Mar 1, 2018

@ocary I have pushed a commit onto gauge intellij plugin. Could you take the latest nightly of Gauge Intellij plugin and test it. Unfortunately, I am not able to reproduce the exact same issue you are facing. I have added a commit which shows the preview only if required. Could you please try this out and let us know if it fixes your issue.

PS: Refer here to subscribe to the nightly channel of Intellij Gauge plugin. The plugin with the fix should be available in nightly version >= 0.3.9.nightly-2018-03-01.

@ocary
Copy link
Author

ocary commented Mar 1, 2018

Installed IntelliJ-Gauge plugin 0.3.9.nightly-2018-03-01 and Spectacle 0.1.2. No lag seen in the operations listed in the original post. Also, when Spectacle is not installed, the IntelliJ event log no longer fills with "Missing plugin... spectacle" messages. Missing plugin only shows when you click on a browser preview icon.

Looks good. Thank you.

@nehashri
Copy link
Contributor

nehashri commented Mar 2, 2018

@ocary Good to hear this :)

@nehashri
Copy link
Contributor

nehashri commented Mar 6, 2018

@ocary We have released a new version of Gauge Intellij Plugin. So the fix should be available with the latest released version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants