Thank you. Your method "Modifying your data import loop" works great. I noticed now, that much of the importing time in my script is due to a "sort" I must due during importing. Any way to keep track also of this time? What I have so far is following (after implementig your idea):

sub import { $dbh = DBI->connect( "dbi:SQLite:files/database/data3.db" ) || die "Ca +nnot connect: $DBI::errstr"; my $start_time = time(); # remember when we started foreach my $row_db ( sort { deaccent($a->[($selected_order+2)]) cmp de +accent($b->[($selected_order+2)]) or $a->[($selected_order+2)] cmp $b +->[($selected_order+2)] } @$all_select_glossary_orderd ) { my ($ID, $a, $b,$c, $d, $e, $f) = @$row_db; ### DOING HERE SOMETIHN WITH MY DATA (IMPORT/PRINTING) if (time - $start_time > 2) { # 2 seconds have passed display_note(); $mw->update(); } } $dbh->disconnect; } #subrutine for better alphab. sorting sub deaccent { my $in = $_[0]; return lc($in) unless ( $in =~ y/\xC0-\xFF// ); #short circuit if +no upper chars # translterate what we can (for speed) $in =~ tr/ÀÁÂÃÄÅàáâãäåÇçÈÉÊËèéêëÌÍÎÏìíîïÒÓÔÕÖØòóôõöøÑñÙÚÛÜùúûüÝÿý/ +AAAAAAaaaaaaCcEEEEeeeeIIIIiiiiOOOOOOooooooNnUUUUuuuuYyy/; # and substitute the rest #my %trans = qw(Æ AE æ ae Þ TH þ th Ð TH ð th ß ss); #$in =~ s/([ÆæÞþÐðß])/$trans{$1}/g; $in =~ tr/'//d; # d for delete return lc($in); }

In reply to Re^2: Showing pop-up window after x-seconds processing by fanticla
in thread Showing pop-up window after x-seconds processing by fanticla

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.