Summary: Overview map recalculated unnecessarily => slow
minimap scrolling (sometimes)
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Wed Mar  9 18:46:44 2011
                Category: client
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: 2.3.0-beta3
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.3.0,2.4.0



With the Gtk client, on my system at least, if the map is big enough to make
the overview map scrollable (say size=50), then scrolling it either by
right-clicking or by using the scrollbar is slow; if there are large
known-but-fogged areas, it slows to a crawl, enough to cause the system to
grey out the whole Freeciv window for not responding.

I think the cause is that the expose event for the overview map widget is
hooked up to refresh_overview_canvas(), which (a) redraws the entirety of
overview.map from map data (and overlaying the fog "sprite" to a pixel while
doing that seems particularly slow); then (b) recentres it and adds the
viewrect to give overview.window; then (c) copies that to the GUI surface.
Only step (c) should be necessary for an expose/damage event.

(This particular cause of expose events is new with 2.3 (expose events are
generated when the scrollable area scrolls on my system), but maybe there are
systems out there which don't provide backing store for the GUI surface, in
which case their overview redraws would be slowed too, and would have been
prior to 2.3.)


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to