Skip to content
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
merged 16 commits into from
Mar 19, 2024

Conversation

jmctune
Copy link
Contributor

@jmctune jmctune commented Mar 9, 2024

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 a replace if the data exists (instead of running a select, checking it and then extra code to update or insert).

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.

@jmctune jmctune requested a review from xshobux March 9, 2024 22:51
@jmctune jmctune self-assigned this Mar 9, 2024
@jmctune jmctune requested a review from SuperFirm84 March 9, 2024 22:57
@jmctune
Copy link
Contributor Author

jmctune commented Mar 16, 2024

/build

@jmctune
Copy link
Contributor Author

jmctune commented Mar 16, 2024

/build

@jmctune
Copy link
Contributor Author

jmctune commented Mar 16, 2024

/build

@jmctune
Copy link
Contributor Author

jmctune commented Mar 16, 2024

/build

@jmctune
Copy link
Contributor Author

jmctune commented Mar 16, 2024

/build

…rings table on character logto replace any <pnplacehold> and <snplacehold> tags with their appropriate values.
@jmctune
Copy link
Contributor Author

jmctune commented Mar 19, 2024

/build

Copy link
Contributor

Link to workflow: https://github.com/dqx-translation-project/dqxclarity/actions/runs/8336316378
Click on the zip at the bottom of the workflow to download.

@jmctune jmctune merged commit 7ff6e86 into main Mar 19, 2024
1 check passed
@jmctune jmctune deleted the use-db-over-raw-files branch March 19, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant