psliwa / idea-composer-plugin

PhpStorm plugin that adds code completion in composer.json file
MIT License
334 stars 10 forks source link

PHPStorm running out of memory since 1.0.32 #85

Closed DenisMir closed 5 years ago

DenisMir commented 5 years ago

Hello.

After updating the plugin to 1.0.32 the current latest PHPStrom version is running out of memory as soon as I open up the composer.json file.

I would love to give you more information. Just drop me a message what you need.

Regards!

psliwa commented 5 years ago

Hi, thank you for letting know. Can you paste me troubleshooting information? (Help > Collect Troubleshooting information).

I tested this plugin on https://github.com/symfony/demo app and I didn't see unusual memory consumption. It would be good if you will know me what are the symptoms from your perspective. Have you tried to clear PhpStorm cache and restart?

DenisMir commented 5 years ago

I'm trying to get the troubleshooting information but the problem is that is crashes faster (runs out of memory) than I can get the information.

The demo application does work for me too as well as most of my projects. I'm trying to find out what in the specific composer.json file results in the mentioned problem.

psliwa commented 5 years ago

How much memory do you have available for PhpStorm? Can you give me troubleshooting info before opening composer.json?

DenisMir commented 5 years ago

Memory available > 3 GB. I had it to > 6 GB as well but it didn't help. No matter how much it is it gets filled in seconds.

I'm getting you the troubleshooting information in a second.

psliwa commented 5 years ago

Thanks, I will have a look at this at the evening.

psliwa commented 5 years ago

Can you also give me a list of top level json keys used in the problematic file?

mschwemer commented 5 years ago

Same here with phpStorm 2019.2.3 on Ubuntu 19.10. A colleague with latest EAP is running fine with this version.

I am on a fresh phpStorm installation without any other plugins currently. I pushed the memory up to 8GB.

First I thought, the "custom repositories code completion support" might be the issue. So I disabled it, before the opening of my composer.json. But that did not change anything.

Then I deleted the previous project configuration .idea in that project and started again. Then phpStorm crashed after indexing the files.

Here ist my list of top level packages:


"require": {
    "php" : "~7.0.0",
    "helhum/class-alias-loader": "1.1.5",
    "typo3/cms": "^8.7.0",
    "typo3/cms-belog": "^8.7",
    "typo3/cms-beuser": "^8.7",
    "typo3/cms-context-help": "^8.7",
    "typo3/cms-fluid-styled-content": "^8.7",
    "typo3/cms-felogin": "^8.7",
    "typo3/cms-filelist": "^8.7",
    "typo3/cms-impexp": "^8.7",
    "typo3/cms-info": "^8.7",
    "typo3/cms-info-pagetsconfig": "^8.7",
    "typo3/cms-lowlevel": "^8.7",
    "typo3/cms-reports": "^8.7",
    "typo3/cms-t3editor": "^8.7",
    "typo3/cms-linkvalidator": "^8.7",
    "typo3/cms-setup": "^8.7",
    "typo3/cms-tstemplate": "^8.7",
    "typo3/cms-viewpage": "^8.7",
    "typo3/cms-recycler": "^8.7",
    "dmitryd/typo3-realurl": "2.3.2",
    "helhum/typo3-console": "~4.5",
    "apache-solr-for-typo3/solr": "^8.1",
    "georgringer/news": "~6.0",
    "markussom/sitemap-generator": "~1.0",
    "bitmotion/secure-downloads": "~2.0",
    "gridelementsteam/gridelements": "^8.3.0",
    "in2code/facilities": "~1.0",
    "in2code/in2mediaserver": "2.0.5",
    "in2code/fetchurl": "~3.2.0",
    "in2code/in2help": "~4.0",
    "in2code/in2videoaudiolist": "~1.0",
    "in2code/powermail": "~4.4.0",
    "in2code/in2glossar": "~1.0",
    "causal/ig_ldap_sso_auth": "~3.2",
    "mschwemer/groupdelegation": "~3.0",
    "vertexvaar/fal_gallery": "~2.1",
    "caretaker/caretaker_instance": "dev-master#e414589",
    "in2code/realurlconflicts": "1.0.*",
    "ichhabrecht/content-defender": "^2.2",
    "apen/additional_reports": "^3.1",
    "jbartels/be-acl": "^1.9.0",
    "typo3/cms-rte-ckeditor": "^8.7"
  },```
psliwa commented 5 years ago

Thanks, could you give me top level json keys from composer.json file instead of top level packages? I mean for example: name, version, repositories, require etc.

psliwa commented 5 years ago

@DenisMir @mschwemer I reverted code from 1.0.32 - a new version 1.0.33 is electively 1.0.31. Can you check if the issue is gone in 1.0.33? Also can you give me top level json keys of composer.json file or whole composer.json file which caused the problem? Full composer.json file would be great - if there are sensitive information you can obfuscate them (eg. package names, versions etc, class / method names etc you can replace by something else), but the whole structure is important. You can send me via email if you like - me@psliwa.org.

I tried to reproduce the problem, analyse the changes introduced in 1.0.32 but without any success, so the quickest temporary fix was to rollback. You can still download corrupted plugin version here: https://plugins.jetbrains.com/files/7631/71285/composer-json-plugin-proguard.zip?updateId=71285&pluginId=7631&family=INTELLIJ, so it would be great if you could help me narrow the problem. Thanks a lot :)

mschwemer commented 5 years ago

@psliwa Thanks a lot! 1.0.33 works like expected.

I will send the composer.json later on per email.

ComiR commented 5 years ago

I was having memory issues too. With current version no more.

composer.json structure ```json { "name": "elementare-teilchen/", "description": "", "license": "GPL-3.0-or-later", "authors": [ { "name": "Raffael Comi", "email": "Raffael.Comi@elementare-teilchen.de" } ], "config": { "vendor-dir": "Packages/Libraries", "bin-dir": "bin", "platform": { "php": "7.2.16" } }, "repositories": [ { "type": "git", "url": "" } ], "extra": { "comments": [ "foobar" ], "patches": { "": { "": "" } } }, "require": { "php": "^7.2", "ext-curl": "*", "ext-json": "*", "": "" }, "require-dev": { "roave/security-advisories": "dev-master", "": "" }, "scripts": { "post-update-cmd": "", "post-install-cmd": "", "post-package-update": "", "post-package-install": "" } } ```
Troubleshooting Information === About === Build version: PhpStorm 2019.3 EAP Build #PS-193.4778.21 October 24, 2019 Java version: 11.0.4+10-b520.2amd64 Operating System: Windows 10 (10.0, amd64) JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o === System === Number of CPU: 8 Used memory: 813Mb Free memory: 1167Mb Total memory: 1981Mb Maximum available memory: 8125Mb === Displays === Displays: Display 0: 3840x2160; scale: 1,00 Display 1: 3840x2160; scale: 1,00 === Plugins === Custom plugins: [Git Checkout Files From Branch (0.1.1), Grep Console (9.8.192.4205.1), Realigner (1.6.0), Shifter (1.9.6), String Manipulation (7.2.182.000.3), JSON Utils (1.1), Wrap to Column (1.4.0), PHP Class Templates (1.0.2), PHP PSR-4 Namespace Detector (1.0.1), PHP 1Up! (0.1.2), Rainglow Color Schemes (1.5.2), Copy Path Helper (1.1.2), Handlebars/Mustache (193.4778.7), PHP RegExp Support (0.9.6), Save Actions (1.6.0+2019.3), PhpClean (2019.03.18), Refactoring (0.1.1), Nested Brackets Colorer (0.5.0), UUID Generator (3.1.0), GitLab Quick Merge Request (12), Find Pull Request (1.6.1), Open Commit On GitHub (1.0.2), Options completion plugin (0.0.7), Json Parser (1.4.1), Ideolog (193.0.15.0), JSON Sorter (1.0.0-beta.3.3), VCS Annotations Preloader (1.0.3), GitAlso (0.3.0), Code comments (2.1), Php Inspections (EA Extended) (4.0.1), JS Toolbox (1.9), Get gist (Beta) (1.0.1.9), Copy/Paste Stack (1.1.5), GitLab Integration Plugin (1.1.2), JSON Viewer (0.3), GitLab Projects (2.0.1), DynamicReturnTypePlugin (2.0.12), PHP inheritDoc helper (1.5.1), Active Intellij Tab Highlighter (1.4.0), Zero Width Characters locator (0.93), Open in GitHub (1.0.6), PHP Foldings (1.0.3), ESLint (1.0.36), PHP Toolbox (0.4.6), PHP Annotations (6.2.1), PHPUnit Enhancement (3.8), TYPO3 XLIFF Utility (0.2.0), FlowStorm (0.1), Fluid - Enterprise (2.1.0), Code blocks sorter (0.1.2), HighlightBracketPair (1.1.2), Branch in Window Title (0.5.3), Rainbow Brackets (5.26), deep-assoc-completion (2019.10.28.001), deep-js-completion (2019.10.07.001), 3v4l pl4g1n (0.4), PHP latest (0.4), Makefile support (1.6.1), PHP Advanced AutoComplete (1.1.0), CSV Plugin (2.8.0), Presentation Assistant (1.0.2), PHP composer.json support (1.0.33), Lines Sorter (1.0.1), Source Synchronizer (1.9), .env files support (2019.3), GitLab integration (1.0.4), PHP Lambda Folding (0.3.0), Nyan Progress Bar (1.13), Neos Support (1.1.1)] Disabled plugins:[Copyright (193.4778.21), File Watchers (193.4778.21), UML (193.4778.21), Angular and AngularJS (193.4778.21), CMD Support (1.0.5), Docker (193.4778.21), Perforce (193.4778.21), SnakeYAML plugin (1.17.0), Subversion (193.4778.21), SvgViewer 2 (2.1), W3C Validators (193.4778.21), ANSI Highlighter (1.2.4), HTTP Client (193.4778.21), TYPO3 CMS Plugin (191.3.25), Styled Components (1.0.11), PHP Attention (1.0), Task Management (193.4778.21), gfm (0.2.0), Time Tracking (193.4778.21), Performance Testing (193.4778.21), Blade (193.4778.21), Drupal (193.4778.21), Joomla! Support (193.4778.21), WordPress (193.4778.21), PhpStorm Workshop (193.4778.21), ASP (193.4778.21), Markdown Navigator (2.7.0), CamelCase (3.0.1), TypoScript - Enterprise (2.0.4), IntelliLab (0.5), Symfony Support (0.19.184), Mercurial (193.4778.21), Hunspell (193.4778.21), Gitmoji (1.0.2), .ignore (2.6.2), Bootstrap 3 (4.1.1), AsciiDoc (0.28.2), CoffeeScript (193.4778.21), Haml (193.4778.21), GNU GetText files support (*.po) (193.4778.21), PHP Docker (193.4778.21), TextMate bundles (193.4778.21), Vagrant (193.4778.21), Vue.js (193.4778.21), SonarLint (4.0.2.3009), PhpStorm phpfmt (1.1.1), GitLink (3.3.1)]
psliwa commented 5 years ago

Thanks guys! I am able to reproduce the problem using files provided by you.

psliwa commented 5 years ago

Version with new bug fixes from 1.0.32 + memory issue fix has been released (1.0.34).