-
Notifications
You must be signed in to change notification settings - Fork 53
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
perf: use the partial hash from textureLocation for caching #642
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe changes in this pull request involve updates to the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
7c8d05d
to
3657e60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
build/build.mjs (1)
228-228
: Simplify the regular expression for extractingimageHash
The regular expression
/!00_([\w\d\S]+)/
can be simplified. Since\w
includes all word characters (letters, digits, and underscores), and\S
matches any non-whitespace character, combining them is redundant. Consider updating the regex for clarity and efficiency.Apply this diff to simplify the regular expression:
-const imageHash = imageStub.match(/!00_([\w\d\S]+)/); +const imageHash = imageStub.match(/!00_([\S]+)/);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (9)
data/img/antiserum-injector-fragment-a2cbfde4c7.png
is excluded by!**/*.png
data/img/bonewidow-capsule.png
is excluded by!**/*.png
data/img/bonewidow-casing.png
is excluded by!**/*.png
data/img/bonewidow-engine.png
is excluded by!**/*.png
data/img/bonewidow-weapon-pod.png
is excluded by!**/*.png
data/img/javlok-capacitor-07b498f28c.png
is excluded by!**/*.png
data/img/mandachord-body-c7d292225d.png
is excluded by!**/*.png
data/img/mandachord-bridge-4343910df2.png
is excluded by!**/*.png
data/img/mandachord-fret-5f0f4b85af.png
is excluded by!**/*.png
📒 Files selected for processing (1)
- build/build.mjs (2 hunks)
🧰 Additional context used
🔇 Additional comments (1)
build/build.mjs (1)
259-259
: Simplified cache update logic enhances code readabilityUsing the
hash
variable directly inthis.updateCache
simplifies the code and improves readability without altering functionality. This change aligns with the streamlined handling of hashes introduced in this update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, feel free to generate the images into the PR so it doesn't have to regen the cache on merge?
6d00787
to
9056ada
Compare
🎉 This PR is included in version 1.1264.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What did you fix?
Looks like DE embeds the hash as part of the texture location. So instead of having to download and generate the has based on data we can instead extract the hash from the
imageStub
and store that insteadReproduction steps
Evidence/screenshot/link to line
Considerations
Summary by CodeRabbit
missingWikiThumb
list with new entries for improved content accuracy.