Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

optimize tablemodel

 
nomeaning
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, after some changes in my implementation, my code has been now horrible.... i would like to optimize it. could you give me some ideas? Since i know i am using some elements of the view inside this model, i need to separate, thanks



 
Ted Smyth
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How large a data set are you using?
 
Rob Spoor
Sheriff
Pie
Posts: 20753
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does object1.getDimension() do? You're potentially calling this method 5 times. If that method performs lengthy executions or creates several objects each time, you might want to cache the results at the start and use that cached value.
 
Maneesh Godbole
Saloon Keeper
Posts: 11341
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "nomeaning".
Do take out time to read the naming policy.
You can change your display name here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic