felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.16k stars 185 forks source link

how do i have it store intellisense data, so it doesnt get rerun on every program start #466

Closed felixfbecker closed 5 years ago

felixfbecker commented 7 years ago

From @OliverLeitner on August 22, 2017 6:18

as the title says...

i would like to reduce the system i/o load by have it not rescan stuff it already scanned.

is that possible?

Copied from original issue: felixfbecker/vscode-php-intellisense#147

felixfbecker commented 7 years ago

It already saves (caches) the index, but will still reindex because the files could have changed since the last run. I would be open to a PR that implements an option for this

duplicate-issues[bot] commented 7 years ago

Hey @felixfbecker,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot

OliverLeitner commented 7 years ago

thanks for redirecting my request.

i wouldnt exactly call this a bug, its more of a feature request that might help with the cpu load thing mentoined at #465

ya, i noticed the caching (thanks btw. @felixfbecker , so if its already caching, one "might" make a "directory checksum" type thingy and then just compare the dirs for changes. afaik most filesystems that i know have directory changes in the "directory entry bit" (size..., date modified...).

str commented 7 years ago
felixfbecker commented 7 years ago

Where is the cache stored?

In the standard cache locations depending on OS. Check the FileSystemCache.php file for details.

What if we do not reindex if the cache has 24h or less?

Then the index would become out of date.

What if we do not reindex the full project but only the the files when open?

Then most IntelliSense features would not work.

What if we renice the reindex so it doesn't block the CPUs making the IDE useless for the first 10 minutes every time we open a project?

Then you would renice the whole language server. The indexing is not in a different process.

str commented 7 years ago

I'll continue the discussion in gitter.

felixfbecker commented 5 years ago

Duplicate of #578