Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8845645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:47:16+00:00 2026-06-14T11:47:16+00:00

I got a question about the NatTable SWT datagrid widget which I want to

  • 0

I got a question about the NatTable SWT datagrid widget which I want to use to display a huge log file.

As the log file can be several GB in size, I cannot load it in memory entirely. The application should use as little heap space as possible. Thus, my IDataProvider implements its getDataValue method to read a log file line on the fly, with the help of a little caching mechanism and a cache for raw line positions within the file. When opening a file, almost nothing is known about its contents – not even the amount of rows the table will eventually have to display.

This leads to several problems which currently freak me out:

1) I have to estimate the total row count (using average line length) until the file has been scanned entirely and a maximum line count is really known for sure. As soon this is the case my getRowCount method returns the actual, correct number of rows. This seems to freak out the NatTable widget, it loses its current position entirely and jumps to row # 1!

2) When doing something intuitive as double-clicking on the border of a column (to auto-size the column, just like in Excel), my application freezes completely as suddenly ALL rows cells contents is queried using my provider and the whole concept is abused! I did not want anything to trigger a full file read!

Does anybody have some hints for me? The documentation is so little and so bad…
Any hint is greatly appreciated! How can I prevent my application from freezing??

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:47:17+00:00Added an answer on June 14, 2026 at 11:47 am

    1) Sounds like the selection isn’t preserved when you change the row count – a row count change implies a backing data change hence it’s probably playing safe and setting the selection to the first row. You could query the selected row before changing the row count and then reset the selection after you change the row count.

    2) In order to figure out what the max-width of the column is, the table has to query each value for that cell in every row… Either you have to implement a paging mechanism such that you return something resulting in zero width when the row isn’t visible, or you’ll probably want to raise a bug against NatTable to request a feature for an auto-resize mode based on only the visible columns!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got another question about .htaccess: I want every param which is given to
I've got a question about Readline Library. I want to know if Readline can
i got a question about unsigned char array. How can i store an integer
i've got a question about the tables and stored procedures which are created by
i've got a question about how is it possible (if possible :) to use
Hay I've got a question about relationships. I want to Users to have Friendships.
Got a question about using mod_rewrite to redirect specific subdomains to use another domain.
I got a question about this program, it says: The FizzBuzz Challenge: Display numbers
I've got a question about use of permissive-licensed (BSD, Apache, MIT, etc) source where
I've got a question about renaming a file after it's been uploaded in Zend.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.