-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: don't access raw json files and use db instead. #177
Merged
Conversation
This file contains 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
…rkbook during download. read the template table to replace w/ player name on login.
…iterating over entire dict and instead, just do lookups
/build |
/build |
/build |
/build |
/build |
…rings table on character logto replace any <pnplacehold> and <snplacehold> tags with their appropriate values.
/build |
Link to workflow: https://github.com/dqx-translation-project/dqxclarity/actions/runs/8336316378 |
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.
Currently, there is a mixture of reading json files and accessing the db depending on what is being done. This refactors everything to read from the db.
When we run an update, we'll keep the files in memory and write them to the database instead of writing them to the
misc_files
directory.This also cleans up how the
merge.xlsx
file is parsed and imported, making it more resilient when forgetting to truncate the spreadsheet's extra rows as well as assuming areplace
if the data exists (instead of running aselect
, checking it and then extra code toupdate
orinsert
).Because I always seem to dog pile issues onto a single PR, this also fixes several inefficiencies around how dict lookups are being done. Instead of iterating through every value in a dict until we find something, we just do a direct lookup instead.
More dog piling -- there is a performance issue with the party hook. As it is triggered very frequently and the code that runs within the hook takes too long to execute, it causes stuttering in busy areas (like Megistris server 1). This hook has been removed and the old scan has been reinstated. I'd rather a slower, continuous scan over game stuttering.
Final add: Adds support to replace placeholder tags like
<pnplacehold>
and<snplacehold>
in the m00_strings table. This allows us to match more strings in our custom files we capture.