in reply to Re^2: Showing pop-up window after x-seconds processing
in thread Showing pop-up window after x-seconds processing
You can also move your updating right into the block passed to sort:
my $last_time = time; sort { if (time - $last_time > 1) { $mw->update(); }; $a <=> $b } @list;
Alternatively, think about caching the search comparisons or creating a string key to sort on. That might be much faster than repeated field accesses:
for (@items) { push @$_, deaccent( $_->[$selected+2] ) . $_->[$selected+2]; }; @items = sort { $a->[-1] cmp $b->[-1] } @items;
|
|---|