Thanks, I will play around with those things.
To be clear, the 3-4 secs is the calculation/display itself.
This table is refreshed every time the user runs a query (possibly hundreds of times in one session).
Up until now, I drew the same table by directly inserting text into the TableMatrix widget and setting approximate row heights based on the number of characters in each cell. That took well under half a second for 500 rows. Here, I need to refresh a widget 500 times for the calculation and then draw 500 widgets for display, and this takes 3-4 sec. It's not intolerable as the first ones show up immediately, but it seems like it should be possible to do it quicker.

Also, when I display a table that takes up the whole screen and then the next search produces only one hit (i.e. only one row needs to be displayed), the hits from the previous search remain there (not all of them, only the top ones that fit on the screen). The TableMatrix widget is correctly resized, but the Text widgets remain there anyway. I tried to update the $mw and the frame the table is in, but that doesn't help. I tried to delete the text from those widgets; the text disappears but the outline of the widget stays. I tried to destroy the widgets and that clears the screen, but it causes an error the next time I try to create a widget in the same cell. I have several columns, so each Text widget is created with
my @tw; [...] $tw[$row][$col] = $mw->Text()

In reply to Re^9: Query the height of Tk::Text widget with word wrap (tk without no tray icon overrideredirect splashscreen state zoomed deiconify by elef
in thread Query the height of Tk::Text widget with word wrap by elef

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.