Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
  • Platform
Try models
  • Timefold Solver SNAPSHOT
  • Plus/Enterprise Editions
  • Performance Improvements
  • Edit this Page

Timefold Solver SNAPSHOT

    • Introduction
    • PlanningAI Concepts
    • Getting Started
      • Overview
      • Hello World Quick Start Guide
      • Quarkus Quick Start Guide
      • Spring Boot Quick Start Guide
      • Vehicle Routing Quick Start Guide
    • Using Timefold Solver
      • Using Timefold Solver: Overview
      • Configuring Timefold Solver
      • Modeling planning problems
      • Running Timefold Solver
      • Benchmarking and tweaking
    • Constraints and Score
      • Constraints and Score: Overview
      • Score calculation
      • Understanding the score
      • Adjusting constraints at runtime
      • Load balancing and fairness
      • Performance tips and tricks
    • Optimization algorithms
      • Optimization Algorithms: Overview
      • Construction heuristics
      • Local search
      • Exhaustive search
      • Neighborhoods: A new way to define custom moves
      • Move Selector reference
    • Responding to change
    • Integration
    • Design patterns
    • FAQ
    • New and noteworthy
    • Upgrading Timefold Solver
      • Upgrading Timefold Solver: Overview
      • Upgrade from Timefold Solver 1.x to 2.0.0
      • Backwards compatibility
      • Migration Guides
        • Variable Listeners to Custom Shadow Variables
        • Chained planning variable to planning list variable
    • Plus/Enterprise Editions
      • Installing Timefold Solver Plus & Enterprise
      • Performance Improvements
      • Score Analysis
      • Recommendation API
      • Nearby selection
      • Multithreaded solving
      • Partitioned search
      • Constraint profiling
      • Incremental score calculation
      • Multistage Moves
      • Throttling best solution events

Performance Improvements

Timefold Solver Enterprise brings many performance improvements. These are shortly described here.

Faster shadow variables

This feature is exclusive to Timefold Solver Enterprise Edition.

Updates to shadow variables happen incrementally with Timefold Solver Enterprise. For models making intensive use of shadow variables, this should be visible as a serious performance improvement out-of-the-box.

This is enabled by default and doesn’t require any special considerations.

Node sharing

This feature is exclusive to Timefold Solver Enterprise Edition.

When a ConstraintProvider does an operation for multiple constraints (such as finding all shifts corresponding to an employee), that work can be shared. This can significantly improve move evaluation speed if the repeated operation is computationally expensive:

nodeSharingValueProposition
Debugging breakpoints put inside your constraints will not be respected, because the ConstraintProvider class will be transformed when this feature is enabled.

Restrictions

To use automatic node sharing outside Quarkus, your ConstraintProvider class must oblige by several restrictions so a valid subclass can be generated:

  • The ConstraintProvider class cannot be final.

  • The ConstraintProvider class cannot have any final methods.

  • The ConstraintProvider class cannot access any protected classes, methods or fields.

Configuration

Node sharing is automatically enabled when running Timefold Solver Enterprise. You can disable the feature by changing the following settings.

  • XML

  • Spring Boot

  • Quarkus

  • Add <constraintStreamAutomaticNodeSharing>false</constraintStreamAutomaticNodeSharing> in your solverConfig.xml:

    <!-- ... -->
    <scoreDirectorFactory>
      <constraintProviderClass>org.acme.MyConstraintProvider</constraintProviderClass>
      <constraintStreamAutomaticNodeSharing>false</constraintStreamAutomaticNodeSharing>
    </scoreDirectorFactory>
    <!-- ... -->

Set the property timefold.solver.constraint-stream-automatic-node-sharing to false in application.properties:

timefold.solver.constraint-stream-automatic-node-sharing=false

Set the property quarkus.timefold.solver.constraint-stream-automatic-node-sharing to false in application.properties:

quarkus.timefold.solver.constraint-stream-automatic-node-sharing=false

What is node sharing?

When using constraint streams, each building block forms a node in the score calculation network. When two building blocks are functionally equivalent, they can share the same node in the network. Sharing nodes allows the operation to be performed only once instead of multiple times, improving the performance of the solver. To be functionally equivalent, the following must be true:

  • The building blocks must represent the same operation.

  • The building blocks must have functionally equivalent parent building blocks.

  • The building blocks must have functionally equivalent inputs.

When all of the above is the case, Timefold Solver can rewrite the ConstraintProvider code at runtime to benefit from the performance improvements node sharing brings.

  • © 2026 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default