IjzerenHein / autolayout.js

Apple's Auto Layout and Visual Format Language for javascript (using cassowary constraints)
MIT License
1.04k stars 63 forks source link

Maybe switch to use slightlyoff/cassowary.js?! #2

Closed mcbain closed 9 years ago

mcbain commented 9 years ago

Seems to be a replacement for the old version, claims to be very fast and future safe :) https://github.com/slightlyoff/cassowary.js

IjzerenHein commented 9 years ago

It's already been using cassowary.js, from the start

mcbain commented 9 years ago

Sorry, i was confused due the npm version 0.0.2 and the git project has no tag or realese, which seems to be very old actually. Maybe use a more recent direct git repo reference as the grid style sheet does?

https://github.com/gss/engine/blob/master/package.json

IjzerenHein commented 9 years ago

Last time I tried, I couldn't get the master build working, got all kinds of crazy and vague errors, so aborted on that. But if you're saying that it is working for others, then it might be worth investigating. Also, there is another version in the 'dist' folder. It uses the 'kiwi' constraint solver, which is waaaayy faster than cassowary.js. Benchmarks show about 8x performance improvement.

mcbain commented 9 years ago

The kiwi impl used is this https://github.com/nucleic/kiwi/tree/feature-js?

Kiwi ranges from 10x to 500x faster than the original Cassowary solver with typical use cases gaining a 40x improvement. 

Sounds impressive, but last commit Apr 22, 2014

IjzerenHein commented 9 years ago

Yeah, the feature.js branch.

The 10x to 500x statement refers to the C++ version.

This is the current progress of the kiwi JS version: https://github.com/IjzerenHein/kiwi/tree/feature-js/ts

The original kiwi maintainer has yet to accept any pull requests, I think he's busy or has other priorities.

mcbain commented 9 years ago

So the kiwi dist uses your fork of kiwi?! 79 commit ahead :) .... Glad to know, that you were able to understand the code base.

IjzerenHein commented 9 years ago

Yeah, it uses my fork. The maintainer of the original kiwi TS version, never got around finishing it, so he asked whether I could help. I added a bunch tests, tooling, benchmarks, docs, and a higher level API for creating constraint expressions, and fixed some bugs..

mcbain commented 9 years ago

+100 :)

IjzerenHein commented 9 years ago

;)