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

gitignore scan .gitignore file in ver 1.3 #204

Closed
hcf0813 opened this issue Mar 21, 2016 · 52 comments
Closed

gitignore scan .gitignore file in ver 1.3 #204

hcf0813 opened this issue Mar 21, 2016 · 52 comments
Labels
Milestone

Comments

@hcf0813
Copy link

hcf0813 commented Mar 21, 2016

Hi, everytime I open my idea integrated .ignore both to scan all moudles' .gitignore file,lead to my ide too broken and unable to work;At the same time waiting for a long time to unfold the moudle's src etc.
image
image

Thanks.

@alxbauer
Copy link

Same here.

@hsz
Copy link
Member

hsz commented Mar 21, 2016

@lovehcf-duplicate @alxbauer Thanks for the quick report. Can you provide me more information about the Project configuration - i.e. submodules, gitignore content, etc - I'll fix it asap.

@awerment
Copy link

Also having this issue with a larger codebase. Notable: when opening module directories for the first time after (re)starting the IDE - it takes a couple seconds and my network traffic spikes.

@hsz
Copy link
Member

hsz commented Mar 21, 2016

@awerment I do not use any network in my plugin, so it's a different reason of this peak.
Can you provide me some information about your IDE, environment, project structure ?
Is it public one so I would like to fetch it too ?

@awerment
Copy link

Thanks for the super quick reply. Unfortunately this is a closed internal project.

I'm running IntelliJ Ultimate 2016.1, 64bit on Win8.

The project layout is quite chaotic, basically it's one parent module which contains sub-directories - one of which is a nested maven module structure. The other directories contain former eclipse projects (we're migrating, don't ask...), they are not managed as modules in IntelliJ.

After going through some of the old projects, I noticed they themselves contained .gitignore files. After removing them (only one remains for the parent directory), the IDE is usable. But the root issue still seems to remain - opening any module folders for the first time takes longer than it does without the plugin enabled. The network spikes also remain, not sure what's the cause there.

@hcf0813
Copy link
Author

hcf0813 commented Mar 21, 2016

One of gitignores' content is as follows:

image

@languanghao
Copy link

I also have same problem after upgrade to v1.3. It cause open floder slow and also make right click menu show slow

@bmcclure
Copy link

Same problem here, I think.

Opening pretty much any full Drupal website in PhpStorm is causing the task "Indexing ignore files" to take several minutes, during which time my IDE is almost completely unresponsive.

After the process completes, then the IDE remains very slow and unresponsive for at least 30 seconds more. Finally, after that it seems to work more quickly, though taking any number of actions, such as attempting to commit code to Git, seems to cause the UI to go unresponsive again for several seconds.

This was not an issue at all until the update I just installed to 1.3 today.

@pswai
Copy link

pswai commented Mar 22, 2016

I am experiencing the performance impact too after upgrading to 1.3. WebStorm becomes very slow to be usable. Disabling the plugin regains the performance.

@z5864703
Copy link

After updating to 1.3 I also emergence of this issue, the project configuration without any changes. Every time you open phpstorm scans items in all .gitignore, then scanned the entire phpstorm reaction becomes very slow, and then pull the situation becomes more serious

@Ornitier
Copy link

Same as @bmcclure here.
Can't work on Drupal projects, had to disable .ignore plugin to continue :(

@hsz
Copy link
Member

hsz commented Mar 22, 2016

@lovehcf-duplicate @alxbauer @awerment @languanghao @bmcclure @pswai @z5864703 @Ornitier

Can you guys please check if following version fixes this issue ?
Remember to unzip this file.

idea-gitignore.zip

@z5864703
Copy link

@hsz
Unable to install the plugin.
Install plugin from disk ... After the restart phpstorm
After the restart widget disappear

@hcf0813
Copy link
Author

hcf0813 commented Mar 23, 2016

@hsz I'm so sorry,unable to install the plugin.Install the plugin from disk and then restart IDE(Android Studio),the widget disappear.

@pswai
Copy link

pswai commented Mar 23, 2016

@hsz I am having the same issue. The plugin disappear from the list after restarting WebStorm

@vikyd
Copy link

vikyd commented Mar 23, 2016

the same problem as @lovehcf-duplicate
IDE: PhpStorm
.ignore version: 1.3
my project: latest Laravel

@hsz
Copy link
Member

hsz commented Mar 23, 2016

@z5864703 @lovehcf-duplicate @pswai @VanDalkvist

Have you unzip this file before and install idea-gitignore.jar file ?

@hsz hsz added the bug label Mar 23, 2016
@hsz hsz added this to the 1.3.1 milestone Mar 23, 2016
@pswai
Copy link

pswai commented Mar 23, 2016

@hsz Installing the jar works! But it gives this error after restarting

7:45:11 PM NullPointerException: mobi.hsz.idea.gitignore.UpdateComponent@4bdffe16

@hsz
Copy link
Member

hsz commented Mar 23, 2016

@pswai Ok, please ignore this error for the moment - what about the performance ?

@hcf0813
Copy link
Author

hcf0813 commented Mar 23, 2016

@hsz Thank you for reminding,the jar works.

@pswai
Copy link

pswai commented Mar 23, 2016

@hsz Much better. Now it won't make WebStorm completely unusable but the lagginess is still there. I have tried to enable/disable it several times and I can feel the difference. It is especially noticeable when using Go To File function, the autocomplete is lagging with small freeze sometimes.

@primeinc
Copy link

Having the same issue, even with the attached jar, PhpStorm 2016.1 on Win 8.1 with Laravel Project. After it's done with the indexing there is a significant lag with just typing/code completion and just about everything else. Phpstorm idle (after indexing) cpu usage is ~6% with the plugin enabled and 0% with it disabled.

Tried to downgrade to 1.2, but get an error

Cannot get state after load
java.lang.NullPointerException
    at mobi.hsz.idea.gitignore.settings.IgnoreSettings.getState(IgnoreSettings.java:145)
    at mobi.hsz.idea.gitignore.settings.IgnoreSettings.getState(IgnoreSettings.java:50)
    at com.intellij.configurationStore.StateGetter.close(StorageBaseEx.kt:57)
    at com.intellij.configurationStore.ComponentStoreImpl.a(ComponentStoreImpl.kt:294)
...

@eman1986
Copy link

I also am experiencing this. Just updated and PhpStorm just crawls, disabling this plugin and its back to being lightning fast.

Really hope this can get resolved, I do enjoy this plugin.

@gvlasov
Copy link

gvlasov commented Mar 31, 2016

I now experience this slowdown with version 1.3.1 of the plugin. The symptoms are the same as in the opening post: loading icon for every .gitignore in the project and massive CPU load. I didn't get this problem before. Not sure what version I had installed, I think it was 1.3.0 that was working fine for me. Disabling the plugin fixed the issue.

@Musiksammler
Copy link

I've updated the plugin to version 1.3.1 this morning (linux ubuntu machine) and phpstorm went painfully slow. After disabling the plugin everything worked as before.

@hsz
Copy link
Member

hsz commented Mar 31, 2016

Can you guys provide me more information about it ? What is the project structure, how mony ignore files do you have (in subfolders too) ? What is the content of the main .gitignore file ?

Do you have any public project, so I could fetch it ?

I'll try to get as much information as I can and deliver the fix today.

@primeinc
Copy link

https://github.com/primeinc/csg-sam is the project I've been working on that has the problems described.

@Musiksammler
Copy link

In my case it's a company internal project. Sorry, no public respositories.

A "find . -type f -name ".gitignore" | wc -l" points out a number of 68.

The main .gitgnore looks like this:

.idea/
.mage
__dev
phpinfo.php
composer.lock
/public/images/artikel/
/public/images/cms/brand-**/*.jpg
/public/images/cms/brand-**/*.jpeg
/public/images/cms/brand-**/*.png
/public/images/cms/brand-**/*.gif
/images/cms/brand-**/*.jpg
/images/cms/brand-**/*.jpeg
/images/cms/brand-**/*.png
/images/cms/brand-**/*.gif

# Smarty / Prototype #
######################
/prototype/cache/
/prototype/fonts/
/prototype/stylesheets/
/prototype/images/
/prototype/templates_c/
/prototype/bower_components/
/prototype/node_modules/
/prototype/js/libs
/prototype/js/main.js

/vendor/**/.git
*.min.min.*
bundle.min.js

@azeos
Copy link

azeos commented Mar 31, 2016

@Suseika I hadn't tried, but unfortunately yes, the problem reappears

@vikyd
Copy link

vikyd commented Apr 1, 2016

@azeos , should I Invalidate Caches for all project? because I have more than 10 projects.

@azeos
Copy link

azeos commented Apr 1, 2016

@Viky-zhang The problem reappears after you close and open again the application. So, disabling the plugin is the only -apparent- solution. Try that first and may be you don't need to invalidate the caches.

@hsz
Copy link
Member

hsz commented Apr 2, 2016

Thank you everyone for the support. I've prepared a fixed version, but before pushing it to the JetBrains repository, I'd like to ask you if you can verify it and confirm that none of above issues appears again.

@azeos
Copy link

azeos commented Apr 3, 2016

@hsz Settings -> Plugins -> Install plugin from disk -> idea-gitignore-1.3.1-2040257.jar and I get "Plugin '.ignore' is incompatible with this installation". PhpStorm 2016.1 x64 @ Win7 x64.

@gvlasov
Copy link

gvlasov commented Apr 3, 2016

@azeos Same here. IDEA IC-145.257 x86_64, Debian

@hsz
Copy link
Member

hsz commented Apr 3, 2016

Ok, sorry about that - gradle plugin by default limits the IDE versions.

Please install following package (without unzipping - select zip file - this one is 'jar-less' package).

Thanks !
(file removed)

@gvlasov
Copy link

gvlasov commented Apr 3, 2016

@hsz I installed the plugin and restarted the IDE. After it reloaded, I had a massive responsiveness degradation in the IDE with high CPU usage, but without the series of messages notifying that .gitignore files are being processed. After some time the slowdown ended. Then I restarted the IDE, and the same temporary slowdown appears for several minutes after starting.

So the only thing that has changed is that now it doesn't show me the notifications attached in the opening post.

@hsz
Copy link
Member

hsz commented Apr 3, 2016

@Suseika I have checked my plugin with profiler tool and it takes just a few % of CPU at the startup so I bet it's not a really caused by the .ignore plugin.

Can you post a CPU snapshot ?
Ref. https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

@hsz hsz closed this as completed Apr 3, 2016
@hsz hsz reopened this Apr 3, 2016
@gvlasov
Copy link

gvlasov commented Apr 3, 2016

@hsz Sorry, I can't:

IntelliJ IDEA and PyCharm Community Editions do not include a YourKit profiler agent, because the YourKit agent library is not open-source.

@gvlasov
Copy link

gvlasov commented Apr 3, 2016

@hsz Can you clone the repository I posted above and try to load it in IDEA with the plugin enabled to see if you get any slowdown at startup? The repository has all the necessary project files for IDEA. Make sure to pull all the submodules.

@primeinc
Copy link

primeinc commented Apr 3, 2016

https://drive.google.com/file/d/0B-3lG2AWxus5SFV3TDVjTWdvUFE/view?usp=sharing

I've attached two snapshots, first one is without the plugin enabled.

Maybe a misconfig is calling git config --global core.excludesfile with no parameters thousands of times.

I don't have a global exclude file setup.

Screenshot:
image

@primeinc
Copy link

primeinc commented Apr 3, 2016

Confirmed Windows workaround:

copy NUL "%USERPROFILE%\.gitignore"
git config --global core.excludesfile "%USERPROFILE%\.gitignore"

Probable? *nix workaround:

touch ~/.gitignore
git config --global core.excludesfile '~/.gitignore'

All performance issues go away, at least with idea-gitignore-1.3.1-3040947

@hsz
Copy link
Member

hsz commented Apr 4, 2016

@primeinc That was a bull's-eye. I've prepared a fix. Can you confirm that it fixes the issue?

idea-gitignore-1.3.1-4041002.zip

Please install following package (without unzipping - select zip file - this one is 'jar-less' package).
Plugins > Install plugin from disk... > Select downloaded zip package

@76200
Copy link

76200 commented Apr 4, 2016

@hsz this fix seems fine

@primeinc
Copy link

primeinc commented Apr 4, 2016

yep I ran git config --global --unset core.excludesfile and restarted phpstorm with the plugin active. Works great still. Also tested it with * in my global exclude and it worked as expected. Glad we could track this down.

@hsz
Copy link
Member

hsz commented Apr 5, 2016

@primeinc That's a good news! Thank you again for the help in this case.

What about the others? Do you also can confirm the performance improvement?

@Musiksammler
Copy link

thumbs-up

Look good!

@hsz hsz closed this as completed Apr 5, 2016
@vikyd
Copy link

vikyd commented Apr 6, 2016

In PhpStorm 2016.1. Look good !
@hsz

@azeos
Copy link

azeos commented Apr 6, 2016

@hsz Thanks for the fix!

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

No branches or pull requests