David-Trezeguet / chesswhiz

Automatically exported from code.google.com/p/chesswhiz
GNU General Public License v3.0
1 stars 0 forks source link

Performance: Pieces are destroyed and created every time #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the Pieces are dynamically loaded and draw at run-time.
When in the Review mode, pieces are re-created (using new Image()) and then 
load() and then 
re-add to the parent again.  As a result, the App needs to contact the server 
every time the user 
clicks on any of the Review button.  We must change the code to improve the 
performance 
because the majority of users (in Vietnam, China) will not have fast network 
connections (like we 
do here in US).

Note: In my other desktop HOXChess app, all the initial 32 pieces are created 
at one time and I 
never have to create a new Piece during the Table/Game 's life time.  When the 
Pieces are 
captures, they are simply hidden (invisible) from the view.

*** Note: As of now, the BoardCanvas class is too complex because it combines 
the UI code with 
everything else (like validation, review, ...). We must break this BoardCanvas 
into multiple class. 
Otherwise, it is too difficult to maintain and to improve.

Original issue reported on code.google.com by huypha...@gmail.com on 6 Nov 2009 at 2:11

GoogleCodeExporter commented 9 years ago
This Issue should have been fixed with the following change:
http://code.google.com/p/chesswhiz/source/detail?r=61

Original comment by huypha...@gmail.com on 10 Nov 2009 at 10:09