Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38613

Re: Displaying a ragged array

Newsgroups comp.lang.java.programmer
Date 2018-09-24 12:01 -0700
References (4 earlier) <pnpe6d$ivs$1@news.albasani.net> <pntsi7$t5j$1@dont-email.me> <pnu278$1o1$1@news.albasani.net> <55787986-dfc9-408b-b592-d3e173b1ba10@googlegroups.com> <pob88f$vhs$1@news.albasani.net>
Message-ID <a5fdaa88-d1a4-4412-8d80-cd010eb6687d@googlegroups.com> (permalink)
Subject Re: Displaying a ragged array
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


On Monday, September 24, 2018 at 1:52:25 PM UTC-4, Martin Gregorie wrote:
> Yep, you're dealing with a lot of rows and columns but, out of curiosity, 
> what's the table size in kb? What length is the data in your widest and 
> narrowest columns?
> 

table size in kb?  Tables are in memory, GUI objects, not sure what size we're looking for.  You mean the size on disk if I can write my results to a csv?  My test data is SQL query results.  My narrowest column on this particular query shows 6 characters, my widest shows 80 characters because I set that as my max width.  If I click into a cell that may hold more (some cells contain much more) the text editor does scroll to see the rest.  If I make a column too wide it doesn't display well.  The bigger your screen, the higher your resolution, the wider you could possibly make it.

> Another interesting comparison would be to know how 'skittish' you find 
> scrolling with the scrollbar. I wrote a maintenance app for my mail 
> archive, based on a PostgreSQL database. When scrolling up and down the  
> 16,700 addresses in the database its twitchy enough to make showing a 
> specific address relatively difficult - the scrollbar slider is the same 
> depth as a line of text in the JTable at this point and so a very small 
> slider movement scrolls past quite a lot of lines. I assume you have the 
> same problem.
> 

On the table with 67k rows if I click and drag the slider it does do many rows at once.  You can click the arrow boxes on the ends of the slider to move it one row, move the scroll wheel to scroll 3 rows at once, or navigate with the arrow keys.  I also use a SearchableGrid so if I want to maintain just one row or small group of rows I can type into my search box.  To make a SearchableGrid you implement the lucene library with a RowSorter.

> > Loading data from a text file (or SQL table) should be pretty fast.
> >
> My roster editor sets up six empty rosters containing 106 rosterees and 
> 52 days (rows) per roster in 5.6 - 7 seconds on the first run of the day 
> and just 2.2 seconds if its subsequently stopped and restarted. It 
> restores a backup of all six completed rosters in about a second (0.9-1.1 
> secs). All figures from my Seiko sport stopwatch. The restore involves 
> loading the backed up data into class instances that were created when 
> the program started up and displayed the set of unpopulated rosters.
> 

I use my custom StopWatch class, which grabs System.nanoTime() to start, then again to stop and subtracts.  Apparently we copied this from the internet, as it starts with a comment line @author Carlos Quintanilla.

> I think this shows that, for the CSV editor, the time spent reading the 
> file is likely to be a lot less than the time spent constructing the 
> class instances used to contain and to display the data.
>   

Of course file read times depend on your hard disk speed, and constructing instances depend on your CPU and RAM but I would expect getting the data from a local text file to be the faster part.  My test data is on a local server, running 15k hard drives, over a gigabit network.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-16 22:17 +0000
  Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 16:00 +0200
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:32 +0000
      Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-17 23:29 +0200
        Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:43 +0000
          Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-19 18:12 +0200
            Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 17:49 +0000
              Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-19 14:25 -0400
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-19 19:29 +0000
                Re: Displaying a ragged array Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-20 15:30 +0200
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-20 15:06 +0000
              Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 08:11 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-24 17:52 +0000
                Re: Displaying a ragged array Eric Douglas <e.d.programmer@gmail.com> - 2018-09-24 12:01 -0700
                Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-10-23 21:00 +0000
  Re: Displaying a ragged array Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-17 10:17 -0400
    Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 19:46 +0000
      Re: Displaying a ragged array Martin Gregorie <martin@mydomain.invalid> - 2018-09-17 23:53 +0000

csiph-web