Repository navigation
[#83] Call handler finalization so their indexes are created - #156
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #83.
Each
ISQLiteHandlerhad aFinalize(SqliteConnection)method that nothing called, so the indexesthat
AssetBundleHandlerandShaderHandlermeant to create were missing from every analyze database.This change wires up the hook rather than deleting the indexes, because all four are on columns that
matter for large builds:
shader_subprograms(shader)andshader_subprogram_keywords(subprogram_id):shader_viewrunscorrelated subqueries per shader against both tables, so without the indexes each shader scans
them. With heavy variant counts these tables reach millions of rows.
preload_dependencies(object)andpreload_dependencies(dependency): the table grows withbundles × assets × dependencies.
objectis the join key ofpreload_dependencies_view, anddependencyanswers "what preloads this object".Changes
ISQLiteHandler.FinalizeDatabase(SqliteConnection)is now part of the interface, as a default no-opmethod. The nine empty stubs are deleted. It is named after
ISQLiteFileParser.FinalizeDatabaseand avoids the
Finalizedestructor name.SerializedFileSQLiteWriter.FinalizeDatabasecalls it on every handler after all files areprocessed, before the
--skip-referencesearly return. It is not inFinalize.sqlbecause thehandler tables exist only when a SerializedFile was parsed.
Testing
dotnet test: full suite green.Analyze_HandlerIndexes_AreCreatedchecks that all four indexes exist, with and without--skip-references.🤖 Generated with Claude Code