[prev in list] [next in list] [prev in thread] [next in thread]
List: calligra-devel
Subject: Re: Review Request: QIcon'ize KoRecentDocumentsPane, fetch big previews only on demand (save memory)
From: "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date: 2012-07-05 13:18:13
Message-ID: 20120705131813.1285.72401 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105428/
-----------------------------------------------------------
(Updated July 5, 2012, 1:18 p.m.)
Review request for Calligra.
Changes
-------
As it seems noone has reviewed this patch yet, let's just add the big-previ=
ew-on-on-demand fetching to this, as it should have an effect on memory usa=
ge, so it is nice to have it in now (and also backported to 2.5).
Summary (updated)
-----------------
QIcon'ize KoRecentDocumentsPane, fetch big previews only on demand (save me=
mory)
Description (updated)
-------
Real reason for this patch is that KFileItem::pixmap(...) is broken for ite=
ms constructed with KFileItem(mode_t, mode_t, KUrl, bool) and no other mime=
type related call before the one to ::pixmap. It will always return a pixma=
p with the "unknown" icon.
You can see this for files for which there is no preview created (for whate=
ver reason).
But the patch fixes also the size mismatch between the fetched previews (20=
0x200) and the usual ODF preview of 128x128 as well as that the preview jus=
t from the icon is set in size 128. And makes the code shorter.
Also load the big previews only on-demand, not by default. Could spare up t=
o ~500 kB (10 files * (128*128 - 64*64) * 4 bytes) in theory, but I did not=
measure what the real effect is.
Also using KIcon instead of setting an own deep copy of the pixmap per each=
KoFileListItem should spare even more memory, due to KIcon reusing existin=
g icon pixmaps.
Okay to backport to 2.5 as well?
Diffs (updated)
-----
libs/main/KoDetailsPane.h 6da6133 =
libs/main/KoDetailsPane.cpp 8aa5965 =
libs/main/KoRecentDocumentsPane.h 98baeb8 =
libs/main/KoRecentDocumentsPane.cpp 521c7e6 =
libs/main/KoTemplatesPane.cpp cc76c05 =
Diff: http://git.reviewboard.kde.org/r/105428/diff/
Testing (updated)
-------
Tried the recent template pane at least in Krita, Words, Sheets
Thanks,
Friedrich W. H. Kossebau
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px \
#c9c399 solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/105428/">http://git.reviewboard.kde.org/r/105428/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px \
black solid;"> <tr>
<td>
<div>Review request for Calligra.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated July 5, 2012, 1:18 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: \
1.5em;">Changes</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">As it seems noone has reviewed this patch yet, let's just \
add the big-preview-on-on-demand fetching to this, as it should have an \
effect on memory usage, so it is nice to have it in now (and also \
backported to 2.5).</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Summary \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">QIcon'ize KoRecentDocumentsPane, fetch big previews only \
on demand (save memory)</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Real reason for this patch is that KFileItem::pixmap(...) is \
broken for items constructed with KFileItem(mode_t, mode_t, KUrl, bool) and \
no other mimetype related call before the one to ::pixmap. It will always \
return a pixmap with the "unknown" icon. You can see this for \
files for which there is no preview created (for whatever reason).
But the patch fixes also the size mismatch between the fetched previews \
(200x200) and the usual ODF preview of 128x128 as well as that the preview \
just from the icon is set in size 128. And makes the code shorter.
Also load the big previews only on-demand, not by default. Could spare up \
to ~500 kB (10 files * (128*128 - 64*64) * 4 bytes) in theory, but I did \
not measure what the real effect is.
Also using KIcon instead of setting an own deep copy of the pixmap per each \
KoFileListItem should spare even more memory, due to KIcon reusing existing \
icon pixmaps.
Okay to backport to 2.5 as well?</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
(updated)</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tried the recent template pane at least in Krita, Words, \
Sheets</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>libs/main/KoDetailsPane.h <span style="color: \
grey">(6da6133)</span></li>
<li>libs/main/KoDetailsPane.cpp <span style="color: \
grey">(8aa5965)</span></li>
<li>libs/main/KoRecentDocumentsPane.h <span style="color: \
grey">(98baeb8)</span></li>
<li>libs/main/KoRecentDocumentsPane.cpp <span style="color: \
grey">(521c7e6)</span></li>
<li>libs/main/KoTemplatesPane.cpp <span style="color: \
grey">(cc76c05)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/105428/diff/" \
style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic