pycharm-odoo icon indicating copy to clipboard operation
pycharm-odoo copied to clipboard

Index performance on readonly filesystem

Open davejames opened this issue 1 year ago • 3 comments

Hello, when using the plugin in combination with a python environment instantiated with Nix, pycharm takes a long time to finish indexing. I couldn't see anything in the logs that might shed any light on what it's getting stuck on, but it's during the "scanning python SDK" stage, once this completes, the indexing itself doesn't take too long.

image

While this is happening the process manager shows vfs and the odoo plugin consuming significant CPU

image

Is there any way I can narrow down what's happening here? I didn't see any logging at this point indicating what the plugin is trying to do.

This is a fairly non-standard setup as python is in a readonly filesystem (nix store), however without the odoo plugin installed indexing works normally. Are there any considerations we might need to make for a readonly python environment?

davejames avatar May 23 '24 00:05 davejames

Hello @davejames ,

The Odoo plugin needs to index some additional data, such as modules, models, fields, xml ids,... to work properly. This indeed requires more time for indexing to complete. I don't think that there is any performance difference with a readonly filesystem because indexing is a read action. Anyway, indexing may take a long time the first time you open a project. Once complete, indexing will only occur with new or changed files, so it will not affect performance.

trinhanhngoc avatar May 23 '24 02:05 trinhanhngoc

Thanks for the reply, sorry I probably wasn't too clear, we're talking about excessive index times here, the CPU is thrashed for up to an hour before it eventually completes. And this is before the codebase itself is indexed, this happens during indexing of the python SDK, and only if the Odoo plugin is enabled.

Is there any way I can determine what the plugin is doing for all that time so that I can report back with more helpful information?

davejames avatar May 23 '24 04:05 davejames

@davejames ,

JetBrains devs often need some logs from Help | Collect Logs and Diagnostic Data after reproducing the issue. I am sure the only heavy processes in the Odoo plugin are index reading.

trinhanhngoc avatar May 23 '24 04:05 trinhanhngoc

Hello @davejames ,

Do you still experience the index performance issue when using the latest version of PyCharm and the Odoo IDE plugin?

trinhanhngoc avatar Oct 21 '25 07:10 trinhanhngoc

Hi @trinhanhngoc I last tried about a month ago, will confirm on the current version, but I expect so. Happy to help diagnose it if you can guide me on what to look for or how to collect telemetry.

Also that was on a different computer so it seems very likely it's related to the readonly python environment and not some other environmental factor.

davejames avatar Oct 21 '25 08:10 davejames

@davejames ,

If you can reproduce the issue, you can use the CPU usage profiling when the issue occurs and send me the snapshot file so I can analyze the root cause.

trinhanhngoc avatar Oct 21 '25 08:10 trinhanhngoc