I’m making a puzzle using backbone.js as my framework.
I’ve got it set up like this:
- The
PuzzleBoardhas a model and a view. - The
PuzzleBoardmodel contains a collection of 200Pieces. - Each
Piecehas a model and a view. - Each
PieceViewis draggable and resizable (my puzzle is non conventional and let’s people resize pieces). - Each
PieceViewhas a set of functions. - There are also some UI menus that each have a model and a view.
I’m using jquery UI resizable, and the problem is that the resizable is really slow. Any ideas? Anything wrong on the conceptual level with my setup? I’m wondering whether it’s because I’ve got too many instantiated pieceViews in memory? Does the fact that each instantiated pieceView has a copy of a set of common PieceView functions cause any problems?
It turns out that some other code was binded to window resize, and resizing divs triggered that code.