Replies: 3 comments 2 replies
-
For profiling the solver, I typically use a tailored JFR profile, see attached. However, without deep understanding of how the solver works under the hood, profiling is unlikely to give you any answers. You'd benefit from profiling if you had a piece of custom code somewhere that would be very resource-intensive, because you'd be easily able to see that. But profiling Constraint Streams, for example, is pointless without understanding the details of tuple propagation through the node network. |
Beta Was this translation helpful? Give feedback.
-
On StackOverflow, I recently answered a question regarding constraint ordering. Although unrelated to your problem @mwotton, I go a bit into detail on how constraints operate under the hood. This may help you understand why profiling and debugging constraints is hard. |
Beta Was this translation helpful? Give feedback.
-
I very much recommend JProfiler (commercial). The memory view especially the hotspots or flame graph view will show you at a glance which are the most inefficient parts of your code and which constraints are really worth to improve. |
Beta Was this translation helpful? Give feedback.
-
I'd like to know where the solver is spending its time. Is there an idiomatic way to detect when you've set the solver up in an inefficient way? I tried
jfr
, but this doesn't seem to tell me anything about my code in particular, just GC events.Beta Was this translation helpful? Give feedback.
All reactions