Am i doing something wrong? Does anyone have any suggestions on how to speed up the scrolling?

You don't have a complete running example, but those regexes look like a likely cause of a slowdown. Below is a simple example of how to scroll the list.

#!/usr/bin/perl use warnings; use strict; use Gtk2 qw/-init/; use Gtk2::SimpleList; my $count = 0; my $win = Gtk2::Window->new; $win->signal_connect( 'destroy' => sub{exit} ); $win->set_default_size(300,200); $win->set_position('center'); my $sw = Gtk2::ScrolledWindow->new (undef, undef); $sw->set_policy ('automatic', 'automatic'); my $ha1 = $sw->get_vadjustment; my $list = Gtk2::SimpleList->new('test' => 'int',); $sw->add($list); $win->add($sw); $win->show_all; Glib::Timeout->add(500, \&update, $list); Gtk2->main; sub update{ my $list = shift; push @{$list->{data}},rand $count++; # bad hack method # $list->scroll_to_point(0,1000); # muppet's suggestion for better scrolling # find the path of the last row in the model. my $path = Gtk2::TreePath->new_from_indices (scalar (@{ $list->{data} }) - 1); # the scalar-of-array is actually just a tie() wrapper for # n_rows = $list->get_model->iter_n_children (undef); # now scroll to that row. let all of the other parameters # default, because we don't need them. $list->scroll_to_cell ($path); return 1; }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: GTK2::SimpleList really slow by zentara
in thread GTK2::SimpleList really slow by GigaRoc

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.