Git Product home page Git Product logo

Comments (32)

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Hi, I have made some optimization, please install the following plugin package manually, check and profile indexing for eu4 game directory again, and then send me the .jfr file for about 5~10 minutes.

This update should optimize the indexing logic for definitions, but there are many other things to be indexed.

Paradox-Language-Support-1.1.6.zip

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

Will try it out in a second, thank you very much!!

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

It did not help unfortunately. Looks about the same. One difference I noticed is that RAM usage is lower. It capped out around 4.5 GB even tho I have 8 GB limit in the IDE settings.

Here is the jfr file:
idea64_exe_2023_08_11_084202.zip

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

During this jfr, it takes 60% time (4000s+) to parse script files, 30% time (2000s+) to indexing. at max 20% time (1400s+) can be optimized by optimizing indexing logic.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

So this is just because there are a lot of files in the EU4 game, or at least mostly because of that. (and the files are long)

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

Do you think it is possible for the plugin to work for this game?

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Not sure, optimize indexing logic helps nearly nothing, but perhaps scripts files to parse during indexing can be optmized and reduced. Should install eu4 and check manually.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

This finally should be a out of memory problem. Over 60,000,000+ config objects are generated by deep copy, deep merge and inline. Approximately 4G of memory is occupied. There should be no other problems. Indexing process should be finished in 20 minutes If this problem are resolved.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

So you are going to be able to fix this issue?

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Not sure for those generated config objects are hard to cache.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

After lastest commit IDE will freeze during indexing event files.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

Does it go through folders alphabetically?

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Yeah IDEA index files (that should be indexed) in project one by one alphabetically.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

So there is quite a lot more to index.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

I thought it could be fixed by giving more ram to the IDE but it just made it consume all of it regardless of how much you gave it.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Cwtools shall not index expressions (e.g. a event target) but only almost definitions and localisations. So it's enough fast. But for my plugin, it shall index expressions. It take too much time to get configs from expressions, to infer it's a event target or some other.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

It should only use the memory you give to IDEA. For Stellaris, 4G shall be ok.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Until this problem is resolved, maybe thoese additional indices can be disabled, to use PLS together with eu4.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

It would be spectacular if you managed to fix this plugin for EU4.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Should be very hard after many updates.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Indexing for eu4 game directory is almost finished after 15 minutes (CPU: 8 cores, RAM: 8G)

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

Does it work normally after the process is finished? Last time I waited for it to finish, the process would start over every time I had added a new file to the project structure. Does it reindex quickly now (15 minutes is quick)?

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

If you'd like to, I could test it on my end, but you would need to send the new plugin version.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

1.1.7 still does not work fine for me.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Need some more optimization

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

The config objects generated during indexing process are too many (3000,000+, 3G+), also the time to consume.
The eu4 game directory is just too crazy. Plugin should parse all script files and localisation files to index definitions, localisations, flags, event targets, and more.
Other files should not be indexed by plugin ,they are just shown by IDEA during scanning.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

I'm sorry but this time I cannot resolve this performance problem. Since there are few remaining features to be implemented, Next several versions should try to do some optimization.

from paradox-language-support.

szczesniak-piotr avatar szczesniak-piotr commented on May 28, 2024

Sure, I hope someday it will be fixed. Thank you!

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Indexing process for eu4 game directory is once finished over 1 hour under 8 cores CPU & 8 G RAM from my last test.
Note that cwt configs exclude Stellaris is not very perfect, so it may show a lot of errors when open a script file.
You may need to send PR to cwtools-eu4-config by yourself as I don't have so much time and vigor.

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

although it was once done, since it's too slow, if you open game directory by IDE twice or make lots of changes, it may still cause a soft IDE freeze (you can operate anything but some IDEA background process is just cannot be finished for a long time)

from paradox-language-support.

DragonKnightOfBreeze avatar DragonKnightOfBreeze commented on May 28, 2024

Indexing process for eu4 game directory is finished over about 4 minutes at 1.1.12.

This version I merge several indices (that require resolving cwt configs) into one index. So the speed to indexing should be much faster when there are too many files to indexing. but the speed to access index should be slower since there are more index data to visit.

Please still note that cwt configs exclude Stellaris is not very perfect, so it may show a lot of errors when open a script file.

Since loading local cwt configs is not supported by PLS currently, you may still need to send PR to cwtools-eu4-config by yourself once 1.1.12 is released.

from paradox-language-support.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.