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


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

Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases
Date 2013-06-11 22:51 -0400
Organization The Wasteland
Message-ID <nospam-766B6E.22514011062013@news.aioe.org> (permalink)
References <9f2c5c11-c4e1-42bc-8c82-e0255ea897a5@m8g2000yqf.googlegroups.com> <kp89mi$uk$1@dont-email.me>

Show all headers | View raw


In article <kp89mi$uk$1@dont-email.me>,
 Knute Johnson <nospam@knutejohnson.com> wrote:

> On 6/11/2013 12:42 PM, Haircuts Are Important wrote:
> > How much memory does a JTable use as the number of rows and 
> > columns increases.
> >
> > How can I measure memory useage and number of pixels used by 
> > a JTable.
> 
> As to memory I have no idea but I am curious why it matters.  
> Most modern computers have a boat load of memory and virtual 
> memory.  As for pixels, you can create it, display it on a 
> JPanel, pack it and ask it how big it is.

Knute's right: Because JTable uses the flyweight pattern to render 
cells, it's memory footprint scales with the number of visible 
cells. The rest depends on the data structure that underlies your 
TablelModel. Profile to be sure.

You've asked about this before, in a now deleted question:

<https://groups.google.com/forum/?fromgroups&hl=en#!topic/comp.lang.java.programmer/CjA3KBqjvVs>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

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


Thread

Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Haircuts Are Important <clusardi2k@aol.com> - 2013-06-11 12:42 -0700
  Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Knute Johnson <nospam@knutejohnson.com> - 2013-06-11 15:56 -0700
    Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases "John B. Matthews" <nospam@nospam.invalid> - 2013-06-11 22:51 -0400
    Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases clusardi2k@aol.com - 2013-06-11 23:29 -0700
    Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases clusardi2k@aol.com - 2013-06-11 23:35 -0700
      Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Haircuts Are Important <clusardi2k@aol.com> - 2013-06-12 05:11 -0700
        Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-06-12 09:12 -0700
      Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Knute Johnson <nospam@knutejohnson.com> - 2013-06-12 08:21 -0700
        Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Haircuts Are Important <clusardi2k@aol.com> - 2013-06-12 09:13 -0700
          Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-06-12 13:29 -0400
            Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Haircuts Are Important <clusardi2k@aol.com> - 2013-06-14 05:47 -0700
              Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-06-14 10:37 -0400
                Re: Memory & Pixel Usage Etc: As Number of JTable Rows & Columns Increases Lew <lewbloch@gmail.com> - 2013-06-14 10:42 -0700

csiph-web