timefold-solver
timefold-solver copied to clipboard
docs: improve documentation for troubleshooting
We are seeing some users jump to complex metaheuristic constructions to improve solver speed. We are missing some guidance on how to solve performance problems / improving the solver results.
We do have a page that discusses performance, but it apparently doesn't get enough attention from our users: https://docs.timefold.ai/timefold-solver/latest/constraints-and-score/performance
Highlight this troubleshooting structure:
- Check constraint implementation
- Use a custom move
- Setup different metaheuristics (and if you do, benchmark on large dataset)
Regarding performance tips and tricks, is it possible to add some performance increasing solutions based on combining the strenghts (or already optimization solutions) from both Java streams and SQL worlds? Or JVM related tips and tricks if they would make sense in a real world app? Also, if other users have some tips that they validated in their projects, they could also share their knowledge with you/us so that they can be added in the documentation.
@PatrickDiallo23, Documentation is a living thing ;) if someone has something valuable, I'll make sure to make a place for that to land.
In regards to the best of both from Java Streams and SQL worlds, could you elaborate? Our ConstraintStream API is sort of a mix of the 2, but also distinct in how it works.
That's good to hear.
Regarding those 2 worlds, well, when working on a application devs (I am one of them😅) often search for either Java Streams Optimization Tricks (this link for example) or SQL performance tricks (this link for example). I am wondering if those kind of tricks could be applied in Timefold when writing Constraints to increase the performance?
Also, another thing I saw (please let me know if I am wrong) is that for cases where you need to iterate and do some checks over a List inside the filter() method it would be better to do a simple for loops than using stream inside.