laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
166 stars 7 forks source link

[Bug]: only on one project phpstorm runs very slow #1059

Open stefanpandele21idnup opened 1 week ago

stefanpandele21idnup commented 1 week ago

Bug description

Hi,

I have laravel idea installed in my phpstorm and only on one laravel project after several minute, phpstorm runs very low

If I disable the plugin, everything is ok

in the Relevant log output you can find the memory analyzer generated by phpstorm. Hope it helps.

Thanks!

Plugin version

8.2.5.242

Operating system

None

Steps to reproduce

No response

Relevant log output

CLASS: byte[] (6244145 objects)
Ignored 315 too-deep objects
Root 1:
[5.08M/ 81%/ 204MB] 1.03GB          1   ROOT: Static field: java.awt.KeyboardFocusManager.focusOwner
[5.08M/ 81%/ 204MB] 1.03GB          1   (root): com.intellij.openapi.editor.impl.EditorComponentImpl
[5.08M/ 81%/ 204MB] 1.03GB          1   editor: com.intellij.openapi.editor.impl.EditorImpl
[5.04M/ 80%/ 202MB]  967MB          1   myProject: com.intellij.openapi.project.impl.ProjectImpl
[5.01M/ 80%/ 201MB]  933MB          1   serviceParentDisposable: com.intellij.openapi.util.Disposer$2
[ 5.0M/ 80%/ 199MB]  919MB          1   (disposer-tree): com.intellij.psi.impl.PsiManagerImpl
[ 5.0M/ 80%/ 199MB]  919MB          1   myFileManager: com.intellij.psi.impl.file.impl.FileManagerImpl
[ 5.0M/ 80%/ 199MB]  919MB          1   myVFileToPsiDirMap: java.util.concurrent.atomic.AtomicReference
[ 5.0M/ 80%/ 199MB]  919MB          1   value: com.intellij.util.containers.ConcurrentSoftValueHashMap
[ 5.0M/ 80%/ 199MB]  919MB          1   myMap: java.util.concurrent.ConcurrentHashMap
[ 5.0M/ 80%/ 199MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[ 5.0M/ 80%/ 199MB]  919MB          1   []: java.util.concurrent.ConcurrentHashMap$Node
[ 5.0M/ 80%/ 199MB]  919MB          1   val: com.intellij.util.containers.ConcurrentSoftValueHashMap$MySoftReference
[ 5.0M/ 80%/ 199MB]  919MB          1 ! (soft): com.intellij.psi.impl.file.PsiDirectoryImpl
[ 5.0M/ 80%/ 199MB]  919MB          1   value: com.intellij.util.keyFMap.OneElementFMap
[ 5.0M/ 80%/ 199MB]  919MB          1   myValue: com.intellij.psi.impl.PsiCachedValueImpl$Direct
[ 5.0M/ 80%/ 199MB]  919MB          1   myProvider: com.intellij.psi.util.CachedValuesManager$1
[ 5.0M/ 80%/ 199MB]  919MB          1   val$provider: com.laravel_idea.plugin.translation.fetching.LaravelTranslationFetch$b
[ 5.0M/ 80%/ 199MB]  919MB          1   c: com.laravel_idea.plugin.translation.fetching.a.b
[ 5.0M/ 80%/ 199MB]  919MB          1   c: java.util.concurrent.ConcurrentHashMap
[ 5.0M/ 80%/ 199MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[ 5.0M/ 80%/ 199MB]  886MB    2061974   []: java.util.concurrent.ConcurrentHashMap$Node
[2.06M/ 33%/98.5MB]  152MB    2061974   +-key: java.lang.String
[2.06M/ 33%/98.5MB]  102MB    2061974 * | value: byte[]
[1.48M/ 23%/56.3MB]  246MB     619522   +-next: java.util.concurrent.ConcurrentHashMap$Node
[ 619K/  9%/27.7MB] 44.0MB     619522   | +-key: java.lang.String
[ 619K/  9%/27.7MB] 29.1MB     619522 * | | value: byte[]
[ 558K/  8%/17.1MB]  120MB     557727   | +-val: java.util.LinkedHashMap
[ 558K/  8%/17.1MB] 60.4MB     557727   | | head: java.util.LinkedHashMap$Entry
[ 557K/  8%/17.1MB] 31.3MB     557727   | | value: java.lang.String
[ 557K/  8%/17.1MB] 17.9MB     557727 * | | value: byte[]
[ 308K/  4%/11.4MB] 50.0MB     131667   | \-next: java.util.concurrent.ConcurrentHashMap$Node
[ 131K/  2%/5.74MB]  9.2MB     131667   |   +-key: java.lang.String
[ 131K/  2%/5.74MB] 6.04MB     131667 * |   | value: byte[]
[ 127K/  2%/ 3.9MB] 27.4MB     127112   |   \-val: java.util.LinkedHashMap
[ 127K/  2%/ 3.9MB] 13.7MB     127112   |     head: java.util.LinkedHashMap$Entry
[ 127K/  2%/ 3.9MB] 7.13MB     127112   |     value: java.lang.String
[ 127K/  2%/ 3.9MB] 4.08MB     127112 * |     value: byte[]
[1.45M/ 23%/44.9MB]  314MB    1445883   \-val: java.util.LinkedHashMap
[1.45M/ 23%/44.7MB]  157MB    1445883     head: java.util.LinkedHashMap$Entry
[1.44M/ 23%/44.4MB] 81.3MB    1445883     value: java.lang.String
[1.44M/ 23%/44.4MB] 46.6MB    1445883 *   value: byte[]

CLASS: java.util.LinkedHashMap (2857740 objects)
Root 1:
[2.84M/ 99%/ 218MB] 1.03GB          1   ROOT: Static field: java.awt.KeyboardFocusManager.focusOwner
[2.84M/ 99%/ 218MB] 1.03GB          1   (root): com.intellij.openapi.editor.impl.EditorComponentImpl
[2.84M/ 99%/ 218MB] 1.03GB          1   editor: com.intellij.openapi.editor.impl.EditorImpl
[2.83M/ 99%/ 218MB]  967MB          1   myProject: com.intellij.openapi.project.impl.ProjectImpl
[2.83M/ 99%/ 218MB]  933MB          1   serviceParentDisposable: com.intellij.openapi.util.Disposer$2
[2.83M/ 99%/ 218MB]  919MB          1   (disposer-tree): com.intellij.psi.impl.PsiManagerImpl
[2.83M/ 99%/ 218MB]  919MB          1   myFileManager: com.intellij.psi.impl.file.impl.FileManagerImpl
[2.83M/ 99%/ 218MB]  919MB          1   myVFileToPsiDirMap: java.util.concurrent.atomic.AtomicReference
[2.83M/ 99%/ 218MB]  919MB          1   value: com.intellij.util.containers.ConcurrentSoftValueHashMap
[2.83M/ 99%/ 218MB]  919MB          1   myMap: java.util.concurrent.ConcurrentHashMap
[2.83M/ 99%/ 218MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[2.83M/ 99%/ 218MB]  919MB          1   []: java.util.concurrent.ConcurrentHashMap$Node
[2.83M/ 99%/ 218MB]  919MB          1   val: com.intellij.util.containers.ConcurrentSoftValueHashMap$MySoftReference
[2.83M/ 99%/ 218MB]  919MB          1 ! (soft): com.intellij.psi.impl.file.PsiDirectoryImpl
[2.83M/ 99%/ 218MB]  919MB          1   value: com.intellij.util.keyFMap.OneElementFMap
[2.83M/ 99%/ 218MB]  919MB          1   myValue: com.intellij.psi.impl.PsiCachedValueImpl$Direct
[2.83M/ 99%/ 218MB]  919MB          1   myProvider: com.intellij.psi.util.CachedValuesManager$1
[2.83M/ 99%/ 218MB]  919MB          1   val$provider: com.laravel_idea.plugin.translation.fetching.LaravelTranslationFetch$b
[2.83M/ 99%/ 218MB]  919MB          1   c: com.laravel_idea.plugin.translation.fetching.a.b
[2.83M/ 99%/ 218MB]  919MB          1   c: java.util.concurrent.ConcurrentHashMap
[2.83M/ 99%/ 218MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[2.83M/ 99%/ 218MB]  886MB    2061974   []: java.util.concurrent.ConcurrentHashMap$Node
[2.06M/ 72%/ 158MB]  412MB    2061974 * +-val: java.util.LinkedHashMap
[ 775K/ 27%/59.7MB]  246MB     619522   \-next: java.util.concurrent.ConcurrentHashMap$Node
[ 619K/ 21%/47.7MB]  130MB     619522 *   +-val: java.util.LinkedHashMap
[ 156K/  5%/12.0MB] 50.0MB     131667     \-next: java.util.concurrent.ConcurrentHashMap$Node
[ 131K/  4%/10.1MB] 28.2MB     131667 *     val: java.util.LinkedHashMap

CLASS: java.util.LinkedHashMap$Entry (2922128 objects)
Root 1:
[2.86M/ 97%/ 148MB] 1.03GB          1   ROOT: Static field: java.awt.KeyboardFocusManager.focusOwner
[2.86M/ 97%/ 148MB] 1.03GB          1   (root): com.intellij.openapi.editor.impl.EditorComponentImpl
[2.86M/ 97%/ 148MB] 1.03GB          1   editor: com.intellij.openapi.editor.impl.EditorImpl
[2.85M/ 97%/ 148MB]  967MB          1   myProject: com.intellij.openapi.project.impl.ProjectImpl
[2.85M/ 97%/ 148MB]  933MB          1   serviceParentDisposable: com.intellij.openapi.util.Disposer$2
[2.84M/ 97%/ 148MB]  919MB          1   (disposer-tree): com.intellij.psi.impl.PsiManagerImpl
[2.84M/ 97%/ 148MB]  919MB          1   myFileManager: com.intellij.psi.impl.file.impl.FileManagerImpl
[2.84M/ 97%/ 148MB]  919MB          1   myVFileToPsiDirMap: java.util.concurrent.atomic.AtomicReference
[2.84M/ 97%/ 148MB]  919MB          1   value: com.intellij.util.containers.ConcurrentSoftValueHashMap
[2.84M/ 97%/ 148MB]  919MB          1   myMap: java.util.concurrent.ConcurrentHashMap
[2.84M/ 97%/ 148MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[2.84M/ 97%/ 148MB]  919MB          1   []: java.util.concurrent.ConcurrentHashMap$Node
[2.84M/ 97%/ 148MB]  919MB          1   val: com.intellij.util.containers.ConcurrentSoftValueHashMap$MySoftReference
[2.84M/ 97%/ 148MB]  919MB          1 ! (soft): com.intellij.psi.impl.file.PsiDirectoryImpl
[2.84M/ 97%/ 148MB]  919MB          1   value: com.intellij.util.keyFMap.OneElementFMap
[2.84M/ 97%/ 148MB]  919MB          1   myValue: com.intellij.psi.impl.PsiCachedValueImpl$Direct
[2.84M/ 97%/ 148MB]  919MB          1   myProvider: com.intellij.psi.util.CachedValuesManager$1
[2.84M/ 97%/ 148MB]  919MB          1   val$provider: com.laravel_idea.plugin.translation.fetching.LaravelTranslationFetch$b
[2.84M/ 97%/ 148MB]  919MB          1   c: com.laravel_idea.plugin.translation.fetching.a.b
[2.84M/ 97%/ 148MB]  919MB          1   c: java.util.concurrent.ConcurrentHashMap
[2.84M/ 97%/ 148MB]  919MB          1   table: java.util.concurrent.ConcurrentHashMap$Node[]
[2.84M/ 97%/ 148MB]  886MB    2061974   []: java.util.concurrent.ConcurrentHashMap$Node
[2.07M/ 70%/ 107MB]  412MB    2061974   +-val: java.util.LinkedHashMap
[2.06M/ 70%/ 107MB]  189MB    2061974   | head: java.util.LinkedHashMap$Entry
[3.54K/  0%/ 184KB]  401KB       3541 * | next: java.util.LinkedHashMap$Entry
[ 776K/ 26%/40.3MB]  246MB     619522   \-next: java.util.concurrent.ConcurrentHashMap$Node
[ 620K/ 21%/32.2MB]  130MB     619522     +-val: java.util.LinkedHashMap
[ 620K/ 21%/32.2MB] 63.6MB     619522     | head: java.util.LinkedHashMap$Entry
[  287/  0%/14.9KB] 32.0KB        287 *   | next: java.util.LinkedHashMap$Entry
[ 156K/  5%/8.13MB] 50.0MB     131667     \-next: java.util.concurrent.ConcurrentHashMap$Node
[ 131K/  4%/6.85MB] 28.2MB     131667       val: java.util.LinkedHashMap
[ 131K/  4%/6.85MB] 13.9MB     131667       head: java.util.LinkedHashMap$Entry
[   32/  0%/1.66KB] 3.71KB         32 *     next: java.util.LinkedHashMap$Entry
adelf commented 1 week ago

Hi. How many localization keys does the app have?

stefanpandele21idnup commented 1 week ago

49 207 854

adelf commented 1 week ago

I'll prepare a special release for you, with some optimizations and the option to not cache translation keys.

stefanpandele21idnup commented 1 week ago

thanks!