perf: don't gate indexing on compliation completing - #769
Conversation
55401f7 to
e9b5658
Compare
|
Maybe I'm missing something, I deleted .expert to force an initial compilation and indexing. Compilation starts, but indexing does not. When I use the "reindex" command I get a log for |
|
@doorgan are you sure? When I run this with a clean build and index, I see progress for compilation and indexing happening at the same time, in the status bar, I see |
|
Yes, here is a recording. After deleting .expert, it does a full compile, finishes, then kicks the indexing: compile.indexing.compressed.mp4If I request reindexing while compilation happens it's the same, it waits for compilation to finish compile.reindex.compressed.mp4 |
|
I tested this too. On Expert repo, when open at root, I have seen something that looked like indexing parallel to compilation (but maybe it was for different apps), but on two other projects it was very clearly indexing after compilation finished. |
|
What's happening is that the new indexer needs the builds paths from mix, and that reintroduces the mix lock. Since the build starts before the indexer, the indexer needs to wait. |
When reindex was run at the same time as compilation, it caused something in the BEAM vm to soak up CPU. This was a permanent condition that would affect the project node until it was restarted. Since we swapped out the ETS based index backend for a SQLite one, we should be able to reindex and compile at the same time. This will dramatically reduce the amount of time the project node takes to boot. This change makes it so indexing and compilation occur at the same time, and we fix up the index after compilation completes
e9b5658 to
3860ae2
Compare
When reindex was run at the same time as compilation, it caused something in the BEAM vm to soak up CPU. This was a permanent condition that would affect the project node until it was restarted.
Since we swapped out the ETS based index backend for a SQLite one, we should be able to reindex and compile at the same time. This will dramatically reduce the amount of time the project node takes to boot.
This change makes it so indexing and compilation occur at the same time, and we fix up the index after compilation completes