| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The generated cloner started every clone with a default-sized IdentityHashMap, so cloning a 110k-entity solution rehashed the map about a dozen times; that was ~9% of each clone. FieldAccessingSolutionCloner already sizes its map from earlier clones. The generated cloner now keeps the size of its previous clone map in an instance field and starts the next map at that size. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmFY9fXcywg9CE9ufNXt5f
There was a problem hiding this comment.
The new shared mutable field must preserve the cloner’s thread-safety contract.
Review effort: Balanced
Findings: 1
Optimizes Gizmo solution cloning by sizing each clone map from the previous clone.
Changes:
| File | Description |
|---|---|
| GizmoSolutionClonerImplementor.java | Adds adaptive clone-map sizing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
SolutionCloner implementations must be thread-safe after initialization, because partitioned search shares one cloner between part threads. FieldAccessingSolutionCloner keeps its size hint in an AtomicInteger; the generated cloner now declares its field volatile. The hint is only written, never read and modified, so visibility is all it needs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmKTGxVTeDoPGmxW4jmxKV
There was a problem hiding this comment.
The focused optimization is correct, thread-safe, and consistent with existing cloner behavior.
Review effort: Balanced
Findings: None
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The Gizmo-generated solution cloner started every clone with a default-sized IdentityHashMap. Cloning a large solution
therefore rehashed the map about a dozen times per clone, and a clone happens on every new best solution.
FieldAccessingSolutionCloner already sizes its map from earlier clones; the generated cloner now does the same: it keeps
the size of its previous clone map in an instance field and starts the next map at that size.
Measured in CPU profiles (JFR, solver thread during local search):
in best-solution cloning.
This was part of a field service routing benchmark on the staging platform (model changes:
TimefoldAI/timefold-field-service-routing#1519), together with the identity-set clear fix that is now on main
(#2726).
🤖 Generated with Claude Code
https://claude.ai/code/session_01XmKTGxVTeDoPGmxW4jmxKV