Java Based lightweight Table (grid)
We are using Table Library for our application. If we load 10000rows and 50-60columns of records in the table (grid) it consumes 3/4 of the application memory and the application hangs.we are mostly using scientific grid in our application.
Can any one suggest a lightweight Java Swing Table that consumes less memory and has features such as filtering, sorting and pagination.
If know any third party table(grids) suggest me.
Thanks in advance
Re: Java Based lightweight Table (grid)
I'm not sure of a "lightweight" table alternative, and I'm not sure it would help you anyway. You're dealing with a ton of data here.
You might be able to optimize the way you store those Objects (are you using a custom model?), or make sure you aren't doing too much processing on the EDT, or split your data into multiple tables that aren't all displayed at the same time.
Re: Java Based lightweight Table (grid)
you mean, like pagination. we have planned for that, but in some places we have to load all the data for business process review purpose.
so we need a table that can handle huge amount of data.
Re: Java Based lightweight Table (grid)
I don't know the details of the application and thus can't really comment on what is making the app hang (data loading, JTable display, etc...). That being said if you believe it to be the table itself, you could try and load the data dynamically - in the TableModel specify the number of row/cols, but only load the data when needed. In other words, the getValueAt is only called when a value at a certain position is needed for display, so you could create a model in which this method loads the data as needed (the model would have to be more complex than that so you aren't making several expensive calls to read a file or database for each call to getValueAt - rather determine what is displayed and make one call to fetch all displayable data, which presumably is not the entire model, and given the loading might hang for a second depending upon the how long it takes for the backend to fetch the data, notify the user while the data is loading).
Re: Java Based lightweight Table (grid)
whatever you said is right, We are mostly using scientific grid in our application. Its taking more memory. we need some other third party table that can handle these problems easily. If you know any thing, can you suggest me.
Re: Java Based lightweight Table (grid)
Like I said, I'm not really sure that one exists. What you're looking for isn't exactly lightweight- you're looking for a pretty advanced piece of software that does a very specific thing. That might not be easy to find. I just did a google search of "loading large amounts of data to JTable" and got back some promising results though.
But this sounds like a job for a custom model, which you're probably already using. Storing the data only as necessary has been suggested, and I think you're putting yourself in a corner by just saying "that won't work" and looking for a third party library instead.