Skip to content

Core: Speed up fill_restrictive item_pool pop loop #4536

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

Merged
merged 3 commits into from
Apr 8, 2025

Conversation

Mysteryem
Copy link
Contributor

What is this fixing or adding?

Items from reachable_items are placed in last-in-first-out order, so items being placed will be towards the end of item_pool, but the iteration to find the item was iterating from the start of item_pool.

Now also uses del instead of .pop() for an additional, tiny, performance increase.

It is unlikely for there to be a noticeable difference in most cases. Only generating with many worlds with a high percentage of progression items and fast access rules is likely to see a difference with this change.

--skip_output generation of 400 template A Hat in Time yamls with progression balancing disabled goes from 76s to 43s (-33s or 43% reduction) for me with this patch. This placed 43200 progression items out of 89974 items total (48% progression items).

A Hat in Time has a large percentage of progression items and has fast access rules. Generation of 400 yamls of a mix of games is probably going to take somewhere more like 30 minutes on average, so saving less than 33 seconds on total generation time in that case is going to be close to negligible.

How was this tested?

Ran generation before and after, the same results were produced.

Items from `reachable_items` are placed in last-in-first-out order, so
items being placed will be towards the end of `item_pool`, but the
iteration to find the item was iterating from the start of `item_pool`.

Now also uses `del` instead of `.pop()` for an additional, tiny,
performance increase.

It is unlikely for there to be a noticeable difference in most cases.
Only generating with many worlds with a high percentage of progression
items and fast access rules is likely to see a difference with this
change.

--skip_output generation of 400 template A Hat in Time yamls with
progression balancing disabled goes from 76s to 43s (43% reduction) for
me with this patch. This placed 43200 progression items out of 89974
items total (48% progression items).
@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jan 21, 2025
@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label Jan 21, 2025
Copy link
Member

@NewSoupVi NewSoupVi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was suspicious at first that this would change generations by filling items in the reverse order or something, but then I thought it through and that doesn't appear to be the case

(For the record, the itempool order is intentional - It is an intended use case that worlds can sort the itempool to fill certain items first/last)

"be" was missing.
@qwint
Copy link
Collaborator

qwint commented Feb 16, 2025

I'm seeing a small timeloss, about 10s/316s, on generating hk yamls (50x my normal yaml which is essentially all-sanity with only choice skips enabled) with this change than without and unsure why (tried a couple other games and didn't see any games that improved too)
code looks fine though which makes it more confusing

@Mysteryem
Copy link
Contributor Author

Mysteryem commented Feb 16, 2025

I'm seeing a small timeloss, about 10s/316s, on generating hk yamls (50x my normal yaml which is essentially all-sanity with only choice skips enabled) with this change than without and unsure why (tried a couple other games and didn't see any games that improved too) code looks fine though which makes it more confusing

Definitely made sure to cherry pick the changes onto the same commit you were testing against (i.e., did not checkout the PR branch), ensuring that all the same changes from the main branch were present and the same seed was generated (assuming the yaml generates deterministically)?

@qwint
Copy link
Collaborator

qwint commented Feb 16, 2025

the two versions i tested against were your branch and your branch with the two commits in the PR reverted, so there shouldn't be a branch difference
I thought i used set seed but don't remember for sure but I generated multiple times on both options (with varying different yamls) and saw a pretty consistent time difference that i mentioned

@Mysteryem
Copy link
Contributor Author

the two versions i tested against were your branch and your branch with the two commits in the PR reverted, so there shouldn't be a branch difference I thought i used set seed but don't remember for sure but I generated multiple times on both options (with varying different yamls) and saw a pretty consistent time difference that i mentioned

Can you attach the yamls you used?

@qwint
Copy link
Collaborator

qwint commented Feb 16, 2025

lol
image
qwintBug.zip
just copied this N times (now everyone point and laugh at all the skips i disable)

@Mysteryem
Copy link
Contributor Author

I redid the 400x template AHiT geneartion with --skip_output --seed 1, which placed 43_200 items in progression fill and performed:

  • Without this PR: 893_420_548 iterations of item_pool and checks of if pool_item is item (74.7s generation on average).
  • With this PR: 39_764_252 iterations of item_pool and checks of if pool_item is item (43.4s generation on average).

This is a difference of 853_656_296 iterations and checks, and about 31.3s. Dividing this 31.3s by 853_656_296 gives 3.67E-8s or 36.7ns per iteration and is check.

The 50x qwintBug.yaml HK generation with --skip_output --seed 1 placed 11_251 items in progression fill and performed:

  • Without this PR: 61_503_889 iterations + is checks
  • With this PR: 1_805_488 iterations + is checks

This is a difference of 59_698_401 iterations and checks. Multiplying this 59_698_401 by 36.7ns gives 2.19s

In actuality, when I ran 7 generations of the HK yamls without this PR and 7 generations with this PR, I see a 4.56s decrease in generation time with this PR, from 373.89s to 369.23s, so within the right sort of ballpark. I'm not really sure why it would decrease slightly more than was expected by extrapolating the AHiT results, there's probably many things that could be affecting it, and some of those could be internal to the CPython implementation.

I ran everything on Python 3.12.9 on Windows 10, on this PR branch with/without the 2 commits.

Copy link
Collaborator

@qwint qwint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure what anecdotal issues I was seeing per my previous comment, but code looks reasonable given the assumption that the item is more likely at the end of the itempool,
and ran some debugging prints locally to confirm even in my hk case that assumption holds true an overwhelming majority of the time

@qwint qwint added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Feb 17, 2025
@NewSoupVi NewSoupVi merged commit 98477e2 into ArchipelagoMW:main Apr 8, 2025
22 of 23 checks passed
FarisTheAncient added a commit to FarisTheAncient/Archipelago that referenced this pull request Apr 29, 2025
commit ec768a2
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Tue Apr 29 10:53:31 2025 -0400

    ALTTP: Swamp Palace West logic fix (ArchipelagoMW#4936)

commit b580d3c
Author: black-sliver <59490463+black-sliver@users.noreply.github.com>
Date:   Tue Apr 29 06:32:36 2025 +0000

    CI: add optional windows release build and build attestation (ArchipelagoMW#4940)

    * CI: github attestation for manually started builds

    * CI: include appimage zsync in build attestation

    * CI: github attestation for Linux release builds

    * CI: reorder steps in build.yml

    * CI: add windows builds to release.yml

    * CI: order jobs in release.yml

    * CI: add missing permission to release.yml

    * CI: enable windows build in release.yml

    * CI: false is skip

commit ce14f19
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Mon Apr 28 18:12:52 2025 -0400

    Stardew Valley: Replace event creation stardew code with add_event (ArchipelagoMW#4922)

    * replace event creation stardew code with add_event

    * delete unnecessary default args

commit 4e3da00
Author: Jonathan Tan <tanjo3@users.noreply.github.com>
Date:   Sun Apr 27 03:43:24 2025 -0400

    TWW: Fix generation failure with output file (ArchipelagoMW#4932)

commit 0d9967e
Author: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Date:   Sat Apr 26 13:28:07 2025 -0400

    OC2: Account for Multiclass Items in Progression Balancing (ArchipelagoMW#4929)

commit 2624a0a
Author: KonoTyran <Kono.Tyran@gmail.com>
Date:   Fri Apr 25 11:54:53 2025 -0700

    Remove Slay the Spire (ArchipelagoMW#4673)

    * Remove Slay the Spire

    * remove slay the spire

commit 8755d5c
Author: Nicholas Brochu <info@nicholasbrochu.com>
Date:   Thu Apr 24 19:42:42 2025 -0400

    Remove Game: Zork Grand Inquisitor (ArchipelagoMW#4884)

    * remove zork grand inquisitor

    * add apworld to inno setup installdelete

commit abb6d7f
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Thu Apr 24 17:36:25 2025 -0400

    Stardew Valley: Replace all add_rule by set_rule ArchipelagoMW#4909

commit fc04192
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Thu Apr 24 17:14:42 2025 -0400

    Lingo: Use OptionCounter for trap_weights (ArchipelagoMW#4920)

commit d4110d3
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Thu Apr 24 23:10:58 2025 +0200

    LttP: make progression health optional (ArchipelagoMW#4918)

commit 05c1751
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Apr 24 22:06:41 2025 +0200

    Core: Add "OptionCounter", use it for generic "StartInventory" and Witness "TrapWeights" (ArchipelagoMW#3756)

    * CounterOption

    * bring back the negative exception for ItemDict

    * Backwards compatibility

    * ruff on witness

    * fix in calls

    * move the contains

    * comment

    * comment

    * Add option min and max values for CounterOption

    * Use min 0 for TrapWeights

    * This is safe now

    * ruff

    * This fits on one line again now

    * OptionCounter

    * Update Options.py

    * Couple more typing things

    * Update Options.py

    * Make StartInventory work again, also make LocationCounter theoretically work

    * Docs

    * more forceful wording

    * forced line break

    * Fix unit test (that wasn't breaking?)

    * Add trapweights to witness option presets to 'prove' that the unit test passes

    * Make it so you can order stuff

    * Update macros.html

commit 6ad042b
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Apr 24 21:56:52 2025 +0200

    Core: Add Region.add_event (ArchipelagoMW#2965)

    * region.add_event function

    * Make it return the location bc why not

    * Actually item bc that seems more useful

    * Update BaseClasses.py

    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

    * Update BaseClasses.py

    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

    * add all the requested features from code review

    * oop

    * roughly sort args in order of importance (imo)

    * Fix typing

    ---------

    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

commit e52d8b4
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Apr 24 21:56:05 2025 +0200

    The Witness: Remove first-stage requirements of progressive items from the logic files (ArchipelagoMW#4257)

    * Remove extraneous symbol requirements

    * Some missed Full Dots cases

    * Bruh

    * merge error

    * merge error 2

commit f288e34
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Thu Apr 24 21:55:48 2025 +0200

    Core: Add a function docstring to roll_settings to hopefully prevent the weights fiasco from being repeated (ArchipelagoMW#3388)

    * Add an option docstring to roll_settings to hopefully prevent the weights fiasco from being repeated

    * Update Generate.py

    * Update Generate.py

commit 5bb87c6
Author: Jarno <jarnowesthof@gmail.com>
Date:   Thu Apr 24 21:33:30 2025 +0200

    Tests: Make overlapping test actually print out the overlaps (ArchipelagoMW#4431)

commit 03768a5
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Thu Apr 24 14:23:51 2025 -0500

    Tests: Test that a world can generate with item links (ArchipelagoMW#2081)

    Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
    Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit a843663
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Thu Apr 24 09:38:30 2025 -0400

    Docs: Update comment for create_item (ArchipelagoMW#4919)

commit 29e6a10
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Thu Apr 24 08:50:34 2025 +0200

    Setup: offer the default-on option to clean /lib folder on update (ArchipelagoMW#4890)

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

commit febd280
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Wed Apr 23 20:30:15 2025 +0200

    Setup: use sha256 for timestamp server (ArchipelagoMW#4892)

commit 73964b3
Author: black-sliver <59490463+black-sliver@users.noreply.github.com>
Date:   Wed Apr 23 15:40:36 2025 +0000

    MultiServer: import get_settings from the correct module (ArchipelagoMW#4914)

    * MultiServer: import get_settings from the correct module

    * MultiServer: settings: use attr inbstead of dict access

commit bad6a4b
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Wed Apr 23 11:31:08 2025 -0400

    Stardew Valley: remove BaseLogic generic so importing mixins is no longer needed (ArchipelagoMW#4916)

    * remove BaseLogic generic so importing mixins is no longer needed

    * self review

commit 57d3c52
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Mon Apr 21 17:41:20 2025 -0400

    TUNIC: More varied reserved locations for local_fill option (ArchipelagoMW#4653)

    * Make reserved locations more varied

    * Use CollectionState(self.multiworld) instead of whatever it used to be

commit d309de2
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Mon Apr 21 16:06:24 2025 -0400

    Lingo: Rework Early Good Items (ArchipelagoMW#4910)

commit d5d56ed
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Mon Apr 21 15:20:22 2025 -0400

    TUNIC: Remove Outdated Plando Code (ArchipelagoMW#4908)

commit 6613c29
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Mon Apr 21 00:53:40 2025 +0200

    Core: print both world source paths in case of conflict (ArchipelagoMW#4751)

commit 1a6de25
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Mon Apr 21 00:43:31 2025 +0200

    Core, all worlds: Hard-deprecate old options API (by August 10th 2024) (ArchipelagoMW#3284)

    * Core: deprecate old options API

    * also deprecate assigning options via option_definitions

    ---------

    Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>

commit b62c136
Author: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Date:   Mon Apr 21 00:43:05 2025 +0200

    MultiServer.py: Another Hint Priority + Item Links bug oh boy (ArchipelagoMW#4874)

    Basically, hints for itemlink worlds' locations get stored in ctx.hints under
    1. the location's player
    2. **every individual player** that is participating in the itemlink.

    Right now, the updatehint code tries to replace and resend the hint under the itemlinked player, which doesn't work.

commit b591627
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Sun Apr 20 23:04:40 2025 +0200

    LttP: increase gen rate of pedestal goal with limited rupee pool (ArchipelagoMW#4905)

    * LttP: increase gen rate of pedestal goal with limited rupee pool

    * improve chance further if retro bow is involved

commit 543dcb2
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Sun Apr 20 10:51:03 2025 -0400

    Stardew Valley: Exclude maximum one resource packs from pool when in start inventory (ArchipelagoMW#4839)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 2294116
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Sun Apr 20 10:17:22 2025 -0400

    Stardew Valley: Refactor Animals to use Content Packs (ArchipelagoMW#4320)

commit 33dc845
Author: Scipio Wright <scipiowright@gmail.com>
Date:   Sun Apr 20 09:48:09 2025 -0400

    TUNIC: Fix UT Issue with Fewer Shops Option (ArchipelagoMW#4873)

commit be0f23b
Author: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com>
Date:   Sun Apr 20 07:46:57 2025 -0600

    CV64: Some DeathLink Adjustments (ArchipelagoMW#4727)

commit b76f216
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Sun Apr 20 08:08:30 2025 -0500

    MM2: Fix invalid weakness failsafe and refactor weakness tests (ArchipelagoMW#4899)

commit 04aa471
Author: Omnises Nihilis <38057571+Omnises@users.noreply.github.com>
Date:   Sun Apr 20 05:43:52 2025 -0700

    KH2: Update Docs (ArchipelagoMW#4871)

commit b756a67
Author: Trevor L <80716066+TRPG0@users.noreply.github.com>
Date:   Sun Apr 20 06:31:58 2025 -0600

    BRC: Update Setup Guide (ArchipelagoMW#4861)

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>
    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit a76ee01
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Sun Apr 20 08:21:02 2025 -0400

    Stardew Valley: Make Bus and Boat Require Money (ArchipelagoMW#4833)

commit eb1fef1
Author: shananas <47014056+shananas@users.noreply.github.com>
Date:   Sun Apr 20 08:20:23 2025 -0400

    KH2: Update Docs (ArchipelagoMW#4869)

commit e498cc7
Author: Doug Hoskisson <beauxq@users.noreply.github.com>
Date:   Sun Apr 20 04:21:40 2025 -0700

    Tests: Don't use `type` as `Callable` (ArchipelagoMW#4866)

commit a26abe0
Author: Doug Hoskisson <beauxq@users.noreply.github.com>
Date:   Sun Apr 20 04:07:17 2025 -0700

    Zillion: Some Code Cleaning (ArchipelagoMW#4780)

commit 199b6bd
Author: qwint <qwint.42@gmail.com>
Date:   Sun Apr 20 06:04:56 2025 -0500

    Launcher: Update header docstring (ArchipelagoMW#4777)

commit e4bc7bd
Author: SunCat <suncat.game@ya.ru>
Date:   Sun Apr 20 07:16:46 2025 +0300

    Checksfinder: Fix the last remnant of outdated game description (ArchipelagoMW#4893)

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>
    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 20651df
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Sat Apr 19 18:21:11 2025 -0500

    kvui: fix kwargs on ResizableTextField and ImageButton (ArchipelagoMW#4903)

commit f857933
Author: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com>
Date:   Sat Apr 19 17:27:03 2025 -0400

    Launcher: Add search box (ArchipelagoMW#4863)

    * Add fuzzy search box to Launcher.

    * move func bind to the kv and prefer substring matching (ArchipelagoMW#79)

    * move the func bind to the kv

    * prefer substr matching

    * Remove fuzzy results, rely on substring only.

    * Use early return instead of else.

    * Add type hint to filter_clients_by_type.

    * Activate search on keyboard input.

    * Clear search box when filtering by type.

    * Update Launcher.py

    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

    ---------

    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
    Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

commit efe2b7c
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Sat Apr 19 11:55:02 2025 -0400

    Core: Support default value with cache_self1 (ArchipelagoMW#4667)

    * add cache_self1_default and tests

    * merge the two decorators

    * just change the defaults of the wrap lol

    * add test for default and default

commit e090153
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Sat Apr 19 15:44:55 2025 +0200

    LttP: fix generation if other games are involved (ArchipelagoMW#4901)

commit 5088b02
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Sat Apr 19 08:42:20 2025 -0500

    Unittests: fix world unittests with unittest module (ArchipelagoMW#4895)

commit 57a716b
Author: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
Date:   Fri Apr 18 17:41:38 2025 -0400

    LTTP: Update to options API (ArchipelagoMW#4134)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 1b51714
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Fri Apr 18 16:34:34 2025 -0500

    LTTP: Rip Lttp specific entrance code out of core and use Region helpers (ArchipelagoMW#1960)

commit cb3d35f
Author: ScootyPuffJr1 <77215594+ScootyPuffJr1@users.noreply.github.com>
Date:   Fri Apr 18 14:50:51 2025 -0400

    LttP: Add keydrop locations to location groups (ArchipelagoMW#4465)

commit a0c83b4
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Fri Apr 18 20:49:08 2025 +0200

    Core: no longer log ID ranges on generate (ArchipelagoMW#4013)

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 1b3ee0e
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Fri Apr 18 20:41:09 2025 +0200

    Core: require clients to support overlapping IDs (ArchipelagoMW#4451)

commit 552a6e7
Author: Mysteryem <Mysteryem@users.noreply.github.com>
Date:   Fri Apr 18 17:41:46 2025 +0100

    Stardew Valley: Precollect building items in deterministic order (ArchipelagoMW#4883)

    The iteration order of sets varies between separate Python processes due to set order being partially based on the hashes of the objects in the set and because Python processes each have a random hash seed by default.

commit 38bfb10
Author: qwint <qwint.42@gmail.com>
Date:   Fri Apr 18 11:15:59 2025 -0500

    Webhost: fix get_seeds api endpoint (ArchipelagoMW#4889)

commit 2dc5587
Author: qwint <qwint.42@gmail.com>
Date:   Thu Apr 17 21:57:41 2025 -0500

    Webhost: add link to new session page (ArchipelagoMW#4857)

    Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com>

commit 4b1898b
Author: qwint <qwint.42@gmail.com>
Date:   Thu Apr 17 17:57:17 2025 -0500

    HK: fix docs whitespace (ArchipelagoMW#4885)

commit 125bf6f
Author: Silvris <58583688+Silvris@users.noreply.github.com>
Date:   Tue Apr 15 17:09:27 2025 -0500

    Core: Post-KivyMD cleanup 2 and enhancements (ArchipelagoMW#4876)

    * Adds a new class allowing TextFields to be resized
    * Resizes most CommonClient components to be more in-line with pre-KivyMD
    * Change the color of SelectableLabels and TooltipLabels to white
    * Fixed ClientTabs not correctly showing the current tab indicator
    * The server label now features a (i) icon to indicate that it can be hovered over.
    * Changed the default `primary_palette` to `Lightsteelblue` and the default `dynamic_scheme_name` to `VIBRANT`
    * Properly set attributes on `KivyJSONToTextParser.TextColors` so that proper typing can be utilized if an individual value is needed
    * Fixed some buttons being discolored permanently once pressed
    * Sped up the animations of button ripples and tab switching
    * Added the ability to insert a new tab to `GameManager.add_client_tab`
    * Hovering over the "Command" button in CommonClient will now display the contents of `/help` as a popup (note: this popup can be too large on default height for adequately large /help (SC2 Client), but should always fit fine on fullscreen).
    * Fixed invalid sizing of MessageBox errors, and changed their text color to white

commit 1873c52
Author: Seldom <38388947+Seldom-SE@users.noreply.github.com>
Date:   Tue Apr 15 06:51:05 2025 -0700

    Terraria: 1.4.4 and Calamity support (ArchipelagoMW#3847)

    * Terraria integration

    * Precollected items for debugging

    * Fix item classification

    * Golem requires Plantera's Bulb

    * Pumpkin Moon requires Dungeon

    * Progressive Dungeon

    * Reorg, Options.py work

    * Items are boss flags

    * Removed unused option

    * Removed nothing

    * Wall, Plantera, and Zenith goals

    * Achievements and items

    * Fixed The Cavalry and Completely Awesome achievements

    * Made "Dead Men Tell No Tales" a grindy achievement

    * Some docs, Python 3.8 compat

    * docs

    * Fix extra item and "Head in the Clouds" being included when achievements are disabled

    * Requested changes

    * Fix potential thread unsafety, replace Nothing with 50 Silver

    * Remove a log

    * Corrected heading

    * Added incompatible mods list

    * In-progress calamity integration

    * Terraria events progress

    * Rules use events

    * Removed an intentional crash I accidentally left in

    * Fixed infinite loop

    * Moved rules to data file

    * Moved item rewards to data file

    * Generating from data file

    * Fixed broken Mech Boss goal

    * Changes Calamity makes to vanilla rules, Calamity final bosses goal

    * Added Deerclops, fixed Zenith goal

    * Final detailed vanilla pass

    * Disable calamity goals

    * Typo

    * Fixed some reward items not adding to item pool

    * In-progress unit test fixes

    * Unit test fixes

    * `.apworld` compat

    * Organized rewards file, made Frog Leg and Fllpper available in vanilla

    * Water Walking Boots and Titan Glove rewards

    * Add goals to slot data

    * Fixed Hammush logic in Post-Mech goal

    * Fixed coin rewards

    * Updated Terraria docs

    * Formatted

    * Deathlink in-progress

    * Boots of the Hero is grindy

    * Fixed zenith goal not placing an item

    * Address review

    * Gelatin World Tour is grindy

    * Difficulty notice

    * Switched some achievements' grindiness

    * Added "Hey! Listen!" achievement

    * Terarria Python 3.8 compat

    * Fixed Terraria You and What Army logic

    * Calamity minion accessories

    * Typo

    * Calamity integration

    * `deathlink` -> `death_link`

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Missing `.`

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Incorrect type annotation

    Co-authored-by: Zach Parks <zach@alliware.com>

    * `deathlink` -> `death_link` 2

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Style

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Markdown style

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Markdown style 2

    Co-authored-by: Zach Parks <zach@alliware.com>

    * Address review

    * Fix bad merge

    * Terraria utility mod recommendations

    * Calamity minion armor logic

    * ArmorMinions -> Armor Minions, boss rush goal, fixed unplaced item

    * Fixed unplaced item

    * Started on Terraria 1.4.4

    * Crate logic

    * getfixedboi, 1.4.4 achievements, shimmer, town slimes, `Rule`, `Condition`, etc

    * More clam getfixedboi logic, bar decraft logic, `NotGetfixedboi` -> `Not Getfixedboi`

    * Calamity fixes

    * Calamity crate ore logic

    * Fixed item accessibility not generating in getfixedboi, fixed not generating with incompatible options, fixed grindy function

    * Early achievements, separate achievement category options

    * Infinity +1 Sword achievement can be location in later goals

    * The Frequent Flyer is impossible in Calamity getfixedboi

    * Add Enchanted Sword and Starfury for starting inventories

    * Don't Dread on Me is redundant in Calamity

    * In Calamity getfixedboi, Queen Bee summons enemies who drop Plague Cell Canisters

    * Can't use Gelatin Crystal outside Hallow

    * You can't get the Terminus without flags

    * Typo

    * Options difficult warnings

    * Robbing the Grave is Hardmode

    * Don't reserve an ID for unused Victory item

    * Plantera is accessible early in Calamity via Giant Plantera's Bulbs

    * Unshuffled Life Crystal and Defender Medal items

    * Comment about Midas' Blessing

    * Update worlds/terraria/Options.py

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>

    * Remove stray expression

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>

    * Review suggestions

    * Option naming caps consistency, add Laser Drill, Lunatic Cultist alt reqs, fix Eldritch Soul Artifact, Ceaseless Void reqs Dungeon

    * Cal Clone doesn't drop Broken Hero Sword anymore, Laser Drill is weaker in Calamity

    Co-authored-by: Seatori <92278897+Seatori@users.noreply.github.com>

    * Fix Acid Rain logic

    * Fix XB-∞ Hekate failing accessibility checks (by commenting it out bc it doesn't affect logic)

    * Hardmode ores being fishable early in Calamity is not a bug anymore

    * Mecha Mayhem is inaccessible in getfixedboi

    * Update worlds/terraria/Rules.dsv

    Co-authored-by: Seafo <92278897+Seatori@users.noreply.github.com>

    ---------

    Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
    Co-authored-by: Zach Parks <zach@alliware.com>
    Co-authored-by: Scipio Wright <scipiowright@gmail.com>
    Co-authored-by: Seatori <92278897+Seatori@users.noreply.github.com>

commit ec1e113
Author: black-sliver <59490463+black-sliver@users.noreply.github.com>
Date:   Sun Apr 13 13:10:36 2025 +0200

    Doc: fix parse_yaml in adding games.md (ArchipelagoMW#4872)

commit 347efac
Author: agilbert1412 <alexgilbert@yahoo.com>
Date:   Fri Apr 11 20:41:08 2025 -0400

    DLC Quest - Skip two long tests in the main pipeline (ArchipelagoMW#4862)

    * - Set up the two long tests to only run when the specific config is active

    * Apply Black Sliver's suggestion

commit b7b5bf5
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Fri Apr 11 20:19:17 2025 -0400

    Stardew Valley: Use classvar_matrix to split tests (ArchipelagoMW#4762)

    * Unroll tests for better parallelization

    * fix ut test

    * self review

    * bro it's the second time today I have to commit some garbage to have a github action rerun because messenger fails what is this

    * my god can the tests plz pass

    * code reviews

    * code reviews

    * move TestRandomWorlds out of long module

commit a324c97
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Fri Apr 11 20:52:20 2025 +0200

    Factorio: fix FloatRanges writing effectively nil into the mod (ArchipelagoMW#4846)

commit f263a0b
Author: Natalie Weizenbaum <nweiz@google.com>
Date:   Thu Apr 10 18:18:49 2025 -0700

    DS3: Mark a lizard location that was previously not annotated (ArchipelagoMW#4860)

commit 6a92990
Author: Mysteryem <Mysteryem@users.noreply.github.com>
Date:   Fri Apr 11 02:17:28 2025 +0100

    MLSS: Fix generation error with emblem hunt and no digspots (ArchipelagoMW#4859)

commit ee471a4
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Thu Apr 10 14:34:21 2025 -0400

    Stardew Valley: Fix some determinism issues with entrance rando when playing with mods (ArchipelagoMW#4812)

commit 879d7c2
Author: qwint <qwint.42@gmail.com>
Date:   Thu Apr 10 13:18:43 2025 -0500

    HK: Workaround for NamedRange webhost bug (ArchipelagoMW#4819)

commit 934b092
Author: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com>
Date:   Thu Apr 10 13:21:33 2025 -0400

    Docs: Update to adding games.md (ArchipelagoMW#4816)

commit 1fd8e44
Author: Carter Hesterman <hestermancarter@gmail.com>
Date:   Thu Apr 10 11:19:03 2025 -0600

    Civ 6: Update setup documentation to account for common pitfalls (ArchipelagoMW#4797)

commit 50fd42d
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Thu Apr 10 12:13:38 2025 -0500

    The Messenger: Add a plando guide (ArchipelagoMW#4719)

commit 399958c
Author: Aaron Wagener <mmmcheese158@gmail.com>
Date:   Thu Apr 10 12:03:05 2025 -0500

    The Messenger: Add an FAQ (ArchipelagoMW#4718)

commit 78c93d7
Author: qwint <qwint.42@gmail.com>
Date:   Thu Apr 10 12:00:48 2025 -0500

    Docs: Add FAQ section for corrupted metadata debugging (ArchipelagoMW#4705)

    Co-authored-by: Scipio Wright <scipiowright@gmail.com>

commit e3b8a60
Author: qwint <qwint.42@gmail.com>
Date:   Wed Apr 9 20:29:11 2025 -0500

    Webhost: Fix Sphere Tracker crashing on item links (ArchipelagoMW#4855)

commit b7263ed
Author: Star Rauchenberger <fefferburbia@gmail.com>
Date:   Wed Apr 9 19:41:07 2025 -0400

    Lingo: Removed unnecessary "global" keywords (ArchipelagoMW#4854)

commit 1ee749b
Author: Ziktofel <ziktofel@gmail.com>
Date:   Wed Apr 9 22:21:16 2025 +0200

    SC2 Client: Fix missing mission tooltip after KivyMD switch (ArchipelagoMW#4827)

commit f93734f
Author: Alchav <59858495+Alchav@users.noreply.github.com>
Date:   Wed Apr 9 13:20:56 2025 -0400

    Pokemon Red and Blue: PC Item Fix (ArchipelagoMW#4835)

    * Pokemon Red and Blue PC Item fix

    * Respect non_local_items for PC Item

    * prefer exclude if also in priority locations

    ---------

    Co-authored-by: alchav <alchav@jalchavware.com>

commit e211dfa
Author: Fabian Dill <Berserker66@users.noreply.github.com>
Date:   Wed Apr 9 07:43:28 2025 +0200

    WebHost: use JS to refresh waitSeed if scripting is enabled (ArchipelagoMW#4843)

commit 0f7deb1
Author: Zach 'Phar' Parks <zach@alliware.com>
Date:   Tue Apr 8 23:46:46 2025 -0500

    WebHost: Remove styleController.js and replace functionality with HTML/CSS. (ArchipelagoMW#4852)

    * ensure footer stays at bottom of page without JS

    * Remove some other usages.

commit f2cb16a
Author: black-sliver <59490463+black-sliver@users.noreply.github.com>
Date:   Wed Apr 9 01:38:46 2025 +0200

    CI: update action ubuntu build runners to 22.04 (ArchipelagoMW#4847)

commit 98477e2
Author: Mysteryem <Mysteryem@users.noreply.github.com>
Date:   Tue Apr 8 22:57:31 2025 +0100

    Core: Speed up fill_restrictive item_pool pop loop (ArchipelagoMW#4536)

    * Core: Speed up fill_restrictive item_pool pop loop

    Items from `reachable_items` are placed in last-in-first-out order, so
    items being placed will be towards the end of `item_pool`, but the
    iteration to find the item was iterating from the start of `item_pool`.

    Now also uses `del` instead of `.pop()` for an additional, tiny,
    performance increase.

    It is unlikely for there to be a noticeable difference in most cases.
    Only generating with many worlds with a high percentage of progression
    items and fast access rules is likely to see a difference with this
    change.

    --skip_output generation of 400 template A Hat in Time yamls with
    progression balancing disabled goes from 76s to 43s (43% reduction) for
    me with this patch. This placed 43200 progression items out of 89974
    items total (48% progression items).

    * Fix comment typo

    "be" was missing.

    ---------

    Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

commit 4149db1
Author: threeandthreee <a.l.nordstrom@gmail.com>
Date:   Tue Apr 8 17:54:50 2025 -0400

    LADX: Stop using Utils.get_options (ArchipelagoMW#4818)

    * init

    * use get

    * Update LinksAwakeningClient.py

    Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>

    * Update LinksAwakeningClient.py

    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

    ---------

    Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
    Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

commit 9ac9213
Author: Jérémie Bolduc <16137441+Jouramie@users.noreply.github.com>
Date:   Tue Apr 8 12:37:45 2025 -0400

    Stardew Valley: Refactor buildings to use content packs (ArchipelagoMW#4239)

    * create building data object and rename ItemSource to Source to be more generic

    * remove compound sources, replace by other requirements which already handle this usecase

    * add coops to content packs

    * add building progression in game features

    * add shippping bin to starting building; remove has_house

    * replace config check with feature

    * add other buildings in content packs

    * not passing

    * tests passes, unbelievable

    * use newly create methods more

    * use new assets to ease readability

    * self review

    * fix flake8 maybe

    * properly split rule for mapping cave systems

    * fix tractor garage name

    * self review

    * add upgrade_from to farm house buldings

    * don't override building name variable in logic

    * remove has_group from buildings

    * mark some items easy in grinding logic so blueprints buildings can be in more early spheres

    * move stuff around to maybe avoid future conflicts cuz I have like 10 PRs opened right now

    * remove price_multiplier, turns out it's unused during generation

    * disable shop source for mapping cave systems

    * bunch of code review changes

    * add petbowl and farmhouse to autobuilding

    * set min easy items to 300

    * fix farm type

commit 286e246
Author: CookieCat <81494827+CookieCat45@users.noreply.github.com>
Date:   Tue Apr 8 12:26:30 2025 -0400

    AHIT: Add start_inventory_from_pool and get_filler_item_name (ArchipelagoMW#4798)

    * Update __init__.py

    * Update Options.py

commit ab2efc0
Author: Emily <35015090+EmilyV99@users.noreply.github.com>
Date:   Tue Apr 8 12:06:19 2025 -0400

    kvui: actually fix [u] and [/u] appearing in copied hints (ArchipelagoMW#4842)
Mysteryem added a commit to Mysteryem/Archipelago-ahit that referenced this pull request May 6, 2025
As of ArchipelagoMW#4536, the item_pool is searched in reverse for better
performance.

batch_item_pool currently has each player's items one after another so
it does not benefit from this, but maybe there could be benefit to
constructing it in an order that is more efficient to pop from.
batch_item_pool is usually much smaller than item_pool, so it will be
quicker to iterate in general.
ProfDeCube pushed a commit to ProfDeCube/Archipelago that referenced this pull request Jun 13, 2025
* Core: Speed up fill_restrictive item_pool pop loop

Items from `reachable_items` are placed in last-in-first-out order, so
items being placed will be towards the end of `item_pool`, but the
iteration to find the item was iterating from the start of `item_pool`.

Now also uses `del` instead of `.pop()` for an additional, tiny,
performance increase.

It is unlikely for there to be a noticeable difference in most cases.
Only generating with many worlds with a high percentage of progression
items and fast access rules is likely to see a difference with this
change.

--skip_output generation of 400 template A Hat in Time yamls with
progression balancing disabled goes from 76s to 43s (43% reduction) for
me with this patch. This placed 43200 progression items out of 89974
items total (48% progression items).

* Fix comment typo

"be" was missing.

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants