Fix pest farming performance + improve rate impact display#688
Open
lixckxx wants to merge 3 commits into
Open
Conversation
brettt89
reviewed
Jun 24, 2026
Contributor
There was a problem hiding this comment.
Did you intend to delete the .env.example file?
Author
There was a problem hiding this comment.
no, thats my bad, thought i didnt include that change when i pushed
4db25b8 to
cdb6997
Compare
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.
Fix pest farming performance + improve rate impact display
Changes:
toLocaleStringcalls with a cachedIntl.NumberFormatmap in+page.svelteandpest-rate-breakdown.svelteto avoid recreating formatters on every call.filter().sort()pet chain into a derivedsortedPets = $derived.by()field inPestFarmingPageContext, so sorting and filtering run reactively instead of on every render#lastRateStateKey,#lastGearRateStateKey, and#lastPetRateStateKeyfields to handle state-based cache invalidation, replacing the previous size-threshold cache clears (>500 / >1000 entries)getPhasePieceRateImpact,getSharedEquipmentPieceRateImpact, andgetPetRateImpact, before cache lookup, so stale entries are invalidated immediately after state changes#calculatePestRateImpactto occur before cache lookup, keyed onresult.stateKey, ensuring the cache is reset before new entries are storedgetPestRateImpactandrateImpactItemsto reuse the existingpestRateCalculatorandpestRateResultderived values instead of instantiating a new calculator and recomputing on every call#itemPriceCacheinPestFarmingPageContextsopestRatePriceBookonly fetches sell values for new item IDs, skipping previously resolved itemsMath.min(...auctionPrices)with areduce()to avoid spreading large arrays into function calls, and simplified bazaar/auction selection logic into a direct comparisonneededItemswith sequentialSet.add()calls to reduce intermediate allocations during recomputation