[Merkaartor] Qt Graphics View - why not used?

Chris Browet cbro at semperpax.com
Thu Nov 20 23:57:25 GMT 2008


Hi,

1) Bart started Merkaartor as a learning project, so I guess he didn't know
about Graphic view (or he didn't want to use it for whatever reason only he
knows). Actually, neither did I when I started to work on Merkaartor...
2) I tried once to make the switch but abandoned because it was a hell of a
job and...
3) I'm not at all convinced performance would be better. Principle of
Graphic view (as I understand it) is that you draw everything and Qt handles
the rest. Although panning would probably be faster, having to "draw"
everything first would mean high latency before first display, this every
time the zoom level changes (have to redraw because not every feature is
displayed at all zoom levels) and far greater memory consumption, which
would probably make low spec machines swap a lot with large areas
downloaded.
4) Graphic view being a "middle-level" api, I assume it ought to be slower
(due to the overhead) that the "lower-level" api we are using. If it is not,
it only means that we are not efficiently painting as we are now.
5) drawDownloadedArea is a good example of something hard to implement the
Graphic view way. Basically, it would mean drawing red dots on the Graphics
view equivalent of the whole world, besides tiny rectangles where data has
been downloaded. I'm not sure this would be efficiently handled by Qt.

Bottom line is that it would have been easier and cleaner to use at the very
beginning, but nowadays would be mucho work to switch with no sure
benefits...

Regards
- Chris -

2008/11/20 Daniel Hermann
<hermann+merkaartor at tfp.uni-karlsruhe.de<hermann%2Bmerkaartor at tfp.uni-karlsruhe.de>
>

> Hi,
>
> I'm new to openstreetmap and merkaartor. I looked a little bit into the
> code
> and discovered that you don't use Qt4 Graphics View framework. Is there a
> specific reason for not using this? I guess it would improve performance
> quite a bit if, for instance, drawDownloadArea() were not called in each
> paintEvent() call.
>
> cheers,
>
> Daniel
>
> _______________________________________________
> Merkaartor mailing list
> Merkaartor at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/merkaartor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/merkaartor/attachments/20081121/67c8f06d/attachment.html>


More information about the Merkaartor mailing list