Time taken to add a constraint - weird outliers

64 views
Skip to first unread message

Alex Birkett

unread,
Nov 27, 2014, 8:43:05 AM11/27/14
to overcon...@googlegroups.com
Adding constrains is time critical in my app. If it takes a long time, it can degrade scrolling performance. 

I've made a test that adds 3000 constraints to a resolver and logs how long it takes to add each constraint using Russell's Java fork with autosolve switched off:
https://github.com/alexbirkett/cassowary-java-1/blob/master/src/test/java/org/pybee/cassowary/test/PerformanceTests.java


The constraints that take longer than 3000 micro seconds to add take up to 400 times longer!

My hypothesis is that after a certain threshold, cassowary decides to do some optimisation when constrains are added. Assuming this is true, is there any way to decide when exactly this work should be done rather than have it happen when a "random" constraint is added? Does anybody know what exactly it's doing?


Thanks,

Alex Birkett

Greg Badros

unread,
Apr 10, 2015, 11:41:39 PM4/10/15
to overcon...@googlegroups.com

Probably just a GC pause, no?

--
You received this message because you are subscribed to the Google Groups "overconstrained" group.
To unsubscribe from this group and stop receiving emails from it, send an email to overconstrain...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages