Skip to content

Optimize agent index#67

Open
joonyeol-sim wants to merge 3 commits intodevfrom
optimize-agent-index
Open

Optimize agent index#67
joonyeol-sim wants to merge 3 commits intodevfrom
optimize-agent-index

Conversation

@joonyeol-sim
Copy link
Contributor

Summary

This refactor replaces per-agent canvas item iteration with shared canvas tags for agent-related UI elements in PlanViz2024.

What changed

  • Added dedicated canvas tag constants for:
    • dynamic agent objects
    • direction indicators
    • static/start objects
    • dynamic agent labels
    • static/start labels
  • Added helper methods to tag agent canvas items and initialized tags during setup.
  • Updated agent visibility/z-order logic to use bulk tag_raise and itemconfig operations on tags instead of looping through every agent.
  • Ensured dynamically recreated direction items are re-tagged after redraw.

Why

Using tags centralizes agent canvas item management, simplifies the code path, and avoids repeated per-agent loops for common visibility and layering operations. Issues #63

Impact

  • No intended functional behavior change.
  • Improves maintainability and should scale better with larger agent counts.

@joonyeol-sim joonyeol-sim added the Q1 (Urgent + Important) Handle immediately / Do now label Feb 18, 2026
@joonyeol-sim joonyeol-sim changed the base branch from main to dev February 18, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Q1 (Urgent + Important) Handle immediately / Do now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant