Skip to content

Fixed issue where unused error Symbols were kept in the objective. - #3

Open
AhoyISki wants to merge 2 commits into
schell:mainfrom
AhoyISki:casuarius
Open

Fixed issue where unused error Symbols were kept in the objective.#3
AhoyISki wants to merge 2 commits into
schell:mainfrom
AhoyISki:casuarius

Conversation

@AhoyISki

Copy link
Copy Markdown

Hello, hope you're doing well.

I found a bug in the solver. Basically, if you remove constraints where both tag.marker and tag.other were of type SymbolType::Error, only tag.marker would get removed, even though tag.other wasn't going to be used anyways. This was caused by a single usage of else if, where if should've been used instead.

In my case, this lead to a blowup in the number of elements in the objective, which severely slowed down cassowary to an unusable state, even though I made sure to always clean up absolutely everything, as checked by all the other members of the Solver, which kept the same number of elements.

I've already done this pull request to the original cassowary-rs. But considering that the last activity on that repository was 7 years ago, I'm not expecting it to actually get merged.

Anyways, hopefully you get this merged, this is a pretty big issue I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant