Search code examples
jquery-uibackbone.jsjquery-ui-resizable

backbone.js jquery ui resizable slow


I'm making a puzzle using backbone.js as my framework.

I've got it set up like this:

  • The PuzzleBoard has a model and a view.
  • The PuzzleBoard model contains a collection of 200 Pieces.
  • Each Piece has a model and a view.
  • Each PieceView is draggable and resizable (my puzzle is non conventional and let's people resize pieces).
  • Each PieceView has 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?


Solution

  • It turns out that some other code was binded to window resize, and resizing divs triggered that code.