Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

peformance problem in application  RSS feed

 
Kristof Camelbeke
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have this problem that I first thought had to do with a memory leakage but I think it is something else.
This is the situation in the application :
When the user selects an item, a query is made on a database selecting items and putting them in a Jtable (I work with an AbstractTableModel).
This works fine except after a while everything slows down to the point that you can't select anything anymore.
Now my question :
Does this problem occur because I am doing a query everytime an item is selected ?
Is this a correct way to deal with a ListSelectionEvent ?
Is it maybe better to read the whole table in an ArrayList at the start of the program and work with this ArrayList during runtime ?
I really don't know what's going on so any help is appreciated.
Thanks,
Kristof
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!