1. A method of removing constraints in optimizing layout of a graphical user interface (GUI) displayed on a display device, the method comprising: identifying a plurality of constraints for bulk removal from a constraint collection based on a change of the GUI, wherein constraints in the constraint collection are related to layout of elements of the GUI on the display device; sorting the plurality of constraints based on a set of criteria to put the plurality of constraints in a sorted order; performing bulk constraint removal on the plurality of constraints based on the sorted order; and displaying the GUI with an updated layout on the display device according to the updated constraint collection.