tag:blogger.com,1999:blog-48196241351361942402024-03-04T22:07:59.647-08:00Qt Developer AdventuresAnonymoushttp://www.blogger.com/profile/14511560056411781713noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-4819624135136194240.post-17266040203821626472013-03-18T13:47:00.000-07:002013-03-18T16:17:45.928-07:00Simple QML vs EFL comparison<style type="text/css">
a:visited
{
color: #881033;
}
</style><br />
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript"></script> Recently I found <a href="http://ngc891.blogdns.net/?p=210">this</a> blog post about complete minesweeper clone - <a href="http://sourceforge.net/projects/elemines/files/0.1">elemines</a> - based on <a href="http://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries">Enlightenment Foundation Libraries</a>. As EFL are designed to efficiently work even on PDAs, I came up with an idea to implement similar clone in plain QML/Javascript (QmlMiner) and perform simple comparative analysis. I wondered how the QML version would compare with the EFL one.<br />
Following areas were analyzed:<br />
<ol><li><a href="http://tolszak-dev.blogspot.com/2013/02/simple-qml-vs-efl-comparison.html#developerExperience">Developer experience</a></li>
<li><a href="http://tolszak-dev.blogspot.com/2013/02/simple-qml-vs-efl-comparison.html#sourceCode">Source code size and used languages</a></li>
<li><a href="http://tolszak-dev.blogspot.com/2013/02/simple-qml-vs-efl-comparison.html#memoryConsumption">Memory consumption</a></li>
<li><a href="http://tolszak-dev.blogspot.com/2013/02/simple-qml-vs-efl-comparison.html#startupTime">Startup time</a></li>
</ol>The comparison was concluded with a limited performance check.<br />
You can look at it from many angles. Just note that I was comparing virtual-machine-based runtime (Qt4/QML - QtQuick 1.1, JavaScript) with EFL app that is coded in C and compiled into a native binary to see how much advantage the low-level C programming has over more modern technology such as QML.<br />
<a name='more'></a><br />
<br />
<h3><a href="" name="developerExperience"></a>1. Developer experience</h3><br />
While creating the QmlMiner, I copied as much appearance and functionality as I could from elemines but decided not to look at elemines code. <br />
<br />
This is how both apps look like:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8Vp-8XljFH_TDbAPE0RklsksukHZ0GBx7AmAeRvNdrVIHr1rZ3aWKBCMsqmPQY3m6CehCUx6tidMaf9zrqIPVBn1DTu5P5h4UJoV3u-jq-YswE-TI66et-yNP3su9yxXyEYwinMoV-BM/s1600/qmlminer2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8Vp-8XljFH_TDbAPE0RklsksukHZ0GBx7AmAeRvNdrVIHr1rZ3aWKBCMsqmPQY3m6CehCUx6tidMaf9zrqIPVBn1DTu5P5h4UJoV3u-jq-YswE-TI66et-yNP3su9yxXyEYwinMoV-BM/s400/qmlminer2.png" width="332" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><span style="font-size: small;">QmlMiner</span></b></td></tr>
</tbody></table><br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvtRQ5H4lVawH3H4fsngq2wg0SVo5H1A0ggz_Cb6jqmMIxL-M1ZzMhhne4NfhVo8uN4HCRvyP4zO_PBNjsndtlLubWhNLKh7os8CM7t4xiRXGyPU2qaBWScuUlYY-i4v7v3spQ3kkqrB0/s1600/elemines2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="elemines" border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvtRQ5H4lVawH3H4fsngq2wg0SVo5H1A0ggz_Cb6jqmMIxL-M1ZzMhhne4NfhVo8uN4HCRvyP4zO_PBNjsndtlLubWhNLKh7os8CM7t4xiRXGyPU2qaBWScuUlYY-i4v7v3spQ3kkqrB0/s400/elemines2.png" title="elemines" width="331" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><span style="font-size: small;">elemines</span></b></td></tr>
</tbody></table><br />
<br />
Surprisingly, the QML implementation didn't take much time:<br />
<table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th>Activity</th> <th>Hours</th> <th>Comment</th> </tr>
<tr> <td>Development time spent on JavaScript code</td> <td><div style="text-align: right;">8</div></td> <td>I have never written any minesweeper engine</td> </tr>
<tr> <td>Development time spent on QML code</td> <td><div style="text-align: right;">12</div></td> <td>Dialogs, button, animations(explosions) etc.</td> </tr>
</tbody></table><br />
I should also mention my experience with related technologies:<br />
<ol><li>Intermediate Qt knowledge (3 years)</li>
<li>A few months of QML development</li>
<li>Basic Javascript knowledge (only used with QML code)</li>
</ol>Plain Qt knowledge was not a requirement in this case because the QmlMiner contains no C/C++ code at all. Understanding QML and simple JS was just enough. The QmlMiner can be executed with the qmlviewer tool but afterwards I added simple main.cpp for memory and startup performance tests to make "lightness" of the QML app possibly similar to elemines. Basically, qmlviewer has many features that are not needed for the task.<br />
After creating the QmlMiner I reviewed some source code of elemines to spot similarities and noticed that both applications have corresponding game engines and default.edc (<a href="http://docs.enlightenment.org/auto/edje/edcref.html">*.edc</a>) file has syntax similar to JSON. It has <i>programs </i>section which I believe is somewhat similar to QML states. <br />
Another observation is that the <i>edc</i> file is a resource of data used in C code. The C code creates objects, imperatively defines interactions between them and lays out the UI. Please note these are only my guesses - guesses of developer neither much experienced in plain C nor in EFL.<br />
<br />
<h3><a href="" name="sourceCode"></a><br />
<b>2. Source code size and used languages</b></h3><br />
<div>I measured size of source code with the <i><a href="http://www.linuxmanpages.com/man1/wc.1.php">wc</a> command</i> and <i><a href="http://www.dwheeler.com/sloccount/">SLOCCount</a></i> tool. <i>SLOCCount</i> was used to count lines of elemines C code and QmlMiner's C++ code (it skipped comments). w<i>c</i> (with -l option) was used to count lines of QML files and eliemines's deafult.edc file. The QML file didn't have any comments and the edc file had only 20, which I excluded. I assumed that the whole QmlMinerModel.qml file contains JS code - it is the <i>,,game engine''.</i> Other files describe the GUI (look and behavior). I didn't analysed the build system files (Makefiles in elemines and a pro file in QmlMiner) because they are not very relevant.</div><br />
The results are as follows: <br />
<button id="buttonLinesOfCodeTable">Show/hide details</button><br />
<div id="linesOfCodeTable"><table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th rowspan="5"><div style="text-align: center;">lines of code</div></th> <th><div style="text-align: center;">purpose</div></th> <th colspan="2"><div style="text-align: center;">QmlMiner</div></th> <th colspan="2"><div style="text-align: center;">EFL elemines</div></th> </tr>
<tr> <td>Business logic</td> <td>jacascript</td> <td><div style="text-align: right;">137</div></td> <td>c</td> <td><div style="text-align: right;">572</div></td> </tr>
<tr> <td>UI and behavior</td> <td>qml</td> <td><div style="text-align: right;">518</div></td> <td>edc</td> <td><div style="text-align: right;">915</div></td> </tr>
<tr> <td>boostrap</td> <td>c++</td> <td><div style="text-align: right;">13</div></td> <td colspan="2"></td> </tr>
<tr> <td>Total</td> <td colspan="2"><div style="text-align: center;">668</div></td> <td colspan="2"><div style="text-align: center;">1487</div></td> </tr>
</tbody></table></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXhm4k1J0ey7kk1Y76hJiTp-UoSv8IG38KDuuW092ppvje88mijAJ3P6FbYdCi3tr3gjgX3v8g3xWGXF5Ujap9s4GtqozUAW7IfgjWih13m36FaLM1YyMIundZQ9gdfvdbWdfDWyTcYVM/s1600/LinesOfCode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXhm4k1J0ey7kk1Y76hJiTp-UoSv8IG38KDuuW092ppvje88mijAJ3P6FbYdCi3tr3gjgX3v8g3xWGXF5Ujap9s4GtqozUAW7IfgjWih13m36FaLM1YyMIundZQ9gdfvdbWdfDWyTcYVM/s640/LinesOfCode.png" width="640" /></a></div><br />
<h3><a href="" name="memoryConsumption"></a>3. Memory consumption</h3><div><br />
<h4><b>Definitions</b></h4>Before presenting memory consumption and startup statistics, I would like to explain some terms:<br />
<ul><li><b>QML App (with compiled-in resources)</b> - an application compiled with all needed resource files compiled into the binary as <a href="http://qt-project.org/doc/qt-4.8/resources.html">Qt resources</a></li>
<li><b>QML App</b> - a standard QmlMiner application. All external resources are kept outside of the application binary </li>
<li><b>EFL App</b> - the original elemines 0.1 application </li>
<li><b>i5 32bit</b> - test machine - Intel i5, 4GB Ram, HDD, Ubuntu 12.10 32bit, Qt 4.8.4, EFL 1.7.4, kernel 3.5.0-25-generic, IceWM 1.3.7</li>
<li><b>i7 32bit -</b> test machine - Intel i7, 8GB Ram, SSD, Ubuntu 12.10 32bit, Qt 4.8.4, EFL 1.7.4, kernel 3.5.0-26-generic, IceWM 1.3.7,</li>
<li><b>i5 64bit</b> - test machine - Intel i5, 4GB Ram, HDD, openSuse 12.2 64bit, Qt 4.8.4, EFL 1.7.5, kernel 3.4.28-2.20-desktop, IceWM 1.3.7</li>
<li><b>i7 64bit</b> - test machine - Intel i7, 6GB Ram, HDD, openSuse 12.2 64bit, Qt 4.8.4, EFL 1.7.99, kernel 3.4.28-2.20-desktop, IceWM 1.3.7.</li>
</ul>I would like to point out main differences which can have impact on test results:<br />
<ul><li>i7 64bit has <b>newest EFL version</b>. According to this <a href="https://phab.enlightenment.org/phame/live/1/post/efl_memory_consumption_moo/">article</a>, there is high possibility that this version has bigger memory footprint than the older ones.<br />
</li>
<li>i7 32bit <b>has SSD drive</b>. Results of cold run tests are significantly different on other test machines (without SSD drive). <br />
</li>
</ul></div><div><h4>Tools</h4>I used the <a href="http://userbase.kde.org/KSysGuard">ksysguard</a> app for memory analysis. To be sure that it is a trustworthy tool, I also used <a href="http://www.selenic.com/smem/">smem</a> for first samples. Results were still the same. All the binaries were examined just after starting and showing main window, without performing any interactive steps. A note: I have already worked on benchmarks in my professional career. <span lang="en-US">A light <a href="http://www.icewm.org/">IceWM</a></span><span lang="en-US"> was used with no background tasks running that would interfere with the test. So most risks of bluring the results by a desktop environments such as E17 or KDE Plasma Workspaces has been reduced.</span> Additional explanations:</div><div><ul><li>Measure unit - KiB</li>
<li>Private - memory used only by the examined process</li>
<li>Shared - memory that can be shared between processes (e.g. shared libraries' own memory)</li>
<li>Rss (Resident set size) - Private + Shared - shown in /proc/<pid>/status under VmRSS</li>
<li>Pss (Proportional set size) - Private + Shared/(number of processes) - lowers if more processes use the same shared libraries</li>
<li>Swap - memory swapped out to the disk</li>
</ul></div><br />
PSS is the most important value as it reflects real memory usage in applications. Shared memory value is divided by number of processes that use it. Following charts show how PSS of every compared application changes on different test machines. <br />
<button id="buttonMemoryTable">Show/hide details</button> <div id="memoryTable"><div style="text-align: right;"><i>Memory consumption comparison - 1 application instance</i></div><table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th colspan="2" width="25%">Measure unit[KB]</th> <th width="25%">QML App</th> <th width="25%">QML Ap with compiled-in resources</th> <th width="25%">EFL App</th> </tr>
<tr> <th rowspan="6">i5 32bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">12248</div></td> <td><div style="text-align: right;">12284</div></td> <td><div style="text-align: right;">13180</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">15300</div></td> <td><div style="text-align: right;">15300</div></td> <td><div style="text-align: right;">2620</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">27548</div></td> <td><div style="text-align: right;">27584</div></td> <td><div style="text-align: right;">15800</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">18498</div></td> <td><div style="text-align: right;">18534</div></td> <td><div style="text-align: right;">13606</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 32bit<br />
SSD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">12404</div></td> <td><div style="text-align: right;">12388</div></td> <td><div style="text-align: right;">13756</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">15504</div></td> <td><div style="text-align: right;">15504</div></td> <td><div style="text-align: right;">3736</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">27908</div></td> <td><div style="text-align: right;">27892</div></td> <td><div style="text-align: right;">17492</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">19119</div></td> <td><div style="text-align: right;">18786</div></td> <td><div style="text-align: right;">14453</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i5 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">14880</div></td> <td><div style="text-align: right;">14860</div></td> <td><div style="text-align: right;">17848</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">10972</div></td> <td><div style="text-align: right;">11004</div></td> <td><div style="text-align: right;">5096</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">25852</div></td> <td><div style="text-align: right;">25864</div></td> <td><div style="text-align: right;">22944</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">18874</div></td> <td><div style="text-align: right;">18871</div></td> <td><div style="text-align: right;">18765</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">14568</div></td> <td><div style="text-align: right;">14564</div></td> <td><div style="text-align: right;">19304</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">10988</div></td> <td><div style="text-align: right;">11020</div></td> <td><div style="text-align: right;">6592</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">25556</div></td> <td><div style="text-align: right;">25584</div></td> <td><div style="text-align: right;">25896</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">18761</div></td> <td><div style="text-align: right;">18787</div></td> <td><div style="text-align: right;">20698</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
</tbody></table><div style="text-align: right;"><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1G_MrijpRfhbBNDgMTHBbI15JJVo4eWCUSO8iONTVB-MMpTedckYty6qxm_bFDcU1XAQsWyEWCuvGW8yyxWzIcjTuUETK5m5iH7Vk1mHyCkEW7buhRHGn-ew4pczMWtVxpmaJcnGm3Ks/s1600/MemoryConsumption.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1G_MrijpRfhbBNDgMTHBbI15JJVo4eWCUSO8iONTVB-MMpTedckYty6qxm_bFDcU1XAQsWyEWCuvGW8yyxWzIcjTuUETK5m5iH7Vk1mHyCkEW7buhRHGn-ew4pczMWtVxpmaJcnGm3Ks/s1600/MemoryConsumption.png" /></a></div><i>Memory consumption comparison - 10 application instances</i> </div><table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th colspan="2" width="25%">Measure unit[KB]</th> <th width="25%">QML App</th> <th width="25%">QML App with compiled-in resources</th> <th width="25%">EFL App</th> </tr>
<tr> <th rowspan="6">i5 32bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">7908</div></td> <td><div style="text-align: right;">7920</div></td> <td><div style="text-align: right;">9808</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">19708</div></td><td><div style="text-align: right;">19856</div></td> <td><div style="text-align: right;">6348</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">27616</div></td> <td><div style="text-align: right;">27776</div></td> <td><div style="text-align: right;">16156</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">11392</div></td> <td><div style="text-align: right;">11391</div></td> <td><div style="text-align: right;">10725</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 32bit<br />
SSD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">8076</div></td> <td><div style="text-align: right;">8000</div></td> <td><div style="text-align: right;">9908</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">20028</div></td> <td><div style="text-align: right;">19900</div></td> <td><div style="text-align: right;">7600</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">28104</div></td> <td><div style="text-align: right;">27900</div></td> <td><div style="text-align: right;">17508</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">11584</div></td> <td><div style="text-align: right;">11461</div></td> <td><div style="text-align: right;">10903</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i5 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">9864</div></td> <td><div style="text-align: right;">9932</div></td> <td><div style="text-align: right;">12716</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">16272</div></td> <td><div style="text-align: right;">16276</div></td> <td><div style="text-align: right;">10012</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">26136</div></td> <td><div style="text-align: right;">26208</div></td> <td><div style="text-align: right;">22728</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">12793</div></td> <td><div style="text-align: right;">12869</div></td> <td><div style="text-align: right;">14125</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">9356</div></td> <td><div style="text-align: right;">9408</div></td> <td><div style="text-align: right;">14172</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">16116</div></td> <td><div style="text-align: right;">16148</div></td> <td><div style="text-align: right;">11728</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">25472</div></td> <td><div style="text-align: right;">25556</div></td> <td><div style="text-align: right;">25900</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">12163</div></td> <td><div style="text-align: right;">12071</div></td> <td><div style="text-align: right;">15798</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
</tbody></table><div style="text-align: right;"><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gb5k-i4U2IZiK7XatwgBeDRW7jGvhfmHk0QKNK1bKIAXI3r9QdrzeQdnr9S8k_pvIHDZfhcNVa6coZ6B3an6LUQ7rlELEpYbiDS6Yz89oNwxFbYooUruOZFIBJr0JtQyh_kfQdKtXnY/s1600/MemoryConsumption_5_instances.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gb5k-i4U2IZiK7XatwgBeDRW7jGvhfmHk0QKNK1bKIAXI3r9QdrzeQdnr9S8k_pvIHDZfhcNVa6coZ6B3an6LUQ7rlELEpYbiDS6Yz89oNwxFbYooUruOZFIBJr0JtQyh_kfQdKtXnY/s1600/MemoryConsumption_5_instances.png" /></a></div><i> </i> <i>Memory consumption comparison - 10 application instances</i> </div><table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th colspan="2" width="25%">Measure unit[KB]</th> <th width="25%">QML App</th> <th width="25%">QML App with compiled-in resources</th> <th width="25%">EFL App</th> </tr>
<tr> <th rowspan="6">i5 32bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">7916</div></td> <td><div style="text-align: right;">7924</div></td> <td><div style="text-align: right;">9484</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">19760</div></td> <td><div style="text-align: right;">18856</div></td> <td><div style="text-align: right;">6356</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">27676</div></td> <td><div style="text-align: right;">27780</div></td> <td><div style="text-align: right;">15840</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">10037</div></td> <td><div style="text-align: right;">10060</div></td> <td><div style="text-align: right;">9953</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 32bit<br />
SSD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">8004</div></td> <td><div style="text-align: right;">7988</div></td> <td><div style="text-align: right;">10204</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">19892</div></td> <td><div style="text-align: right;">19980</div></td> <td><div style="text-align: right;">7600</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">27896</div></td> <td><div style="text-align: right;">27968</div></td> <td><div style="text-align: right;">17804</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">10128</div></td> <td><div style="text-align: right;">10124</div></td> <td><div style="text-align: right;">10744</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i5 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">9792</div></td> <td><div style="text-align: right;">9764</div></td> <td><div style="text-align: right;">12764</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">16272</div></td> <td><div style="text-align: right;">16084</div></td> <td><div style="text-align: right;">10020</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">26064</div></td> <td><div style="text-align: right;">25848</div></td> <td><div style="text-align: right;">22784</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">11630</div></td> <td><div style="text-align: right;">11575</div></td> <td><div style="text-align: right;">13516</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
<tr> <th rowspan="6">i7 64bit<br />
HDD</th> </tr>
<tr> <td style="text-align: center;"><b>Private</b></td> <td><div style="text-align: right;">9460</div></td> <td><div style="text-align: right;">9440</div></td> <td><div style="text-align: right;">141760</div></td> </tr>
<tr> <td style="text-align: center;"><b>Shared</b></td> <td><div style="text-align: right;">16384</div></td><td><div style="text-align: right;">16380</div></td> <td><div style="text-align: right;">11736</div></td> </tr>
<tr> <td style="text-align: center;"><b>Rss</b></td> <td><div style="text-align: right;">25844</div></td> <td><div style="text-align: right;">25820</div></td> <td><div style="text-align: right;">25912</div></td> </tr>
<tr> <td style="text-align: center;"><b>Pss</b></td> <td><div style="text-align: right;">11285</div></td> <td><div style="text-align: right;">11195</div></td> <td><div style="text-align: right;">15030</div></td> </tr>
<tr> <td style="text-align: center;"><b>Swap</b></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> <td><div style="text-align: right;">0</div></td> </tr>
</tbody></table><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0umLmp_kWUZOPAQg59ZEF5ow-OgDmMVrauEw3Z7j4nf7LJ2uUAUq04PBf1_cfqovRqsjdZrTmx2N_zhFHWF2R-XvWPI-OfRMRXfetD8ZeRxtrsNeZOWWz9-B_XKro7SFWK8HWMgCjvD0/s1600/MemoryConsumption_10_instances.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0umLmp_kWUZOPAQg59ZEF5ow-OgDmMVrauEw3Z7j4nf7LJ2uUAUq04PBf1_cfqovRqsjdZrTmx2N_zhFHWF2R-XvWPI-OfRMRXfetD8ZeRxtrsNeZOWWz9-B_XKro7SFWK8HWMgCjvD0/s1600/MemoryConsumption_10_instances.png" /></a></div><div class="separator" style="clear: both; text-align: center;"></div></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsTIbbiF96o1Jd62hbk44Wa9xdhcn_a0sTJx122ONdxO8c8c6Q-R6CmKBaqy1aiFoitQLR0vf-v5mSk6nK0UrFtH18syzr5P0mfox9GbxZCALgIAQmM-yM3shR3g1TyfOT4ah1v5DRQAg/s1600/PSS_1_instance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsTIbbiF96o1Jd62hbk44Wa9xdhcn_a0sTJx122ONdxO8c8c6Q-R6CmKBaqy1aiFoitQLR0vf-v5mSk6nK0UrFtH18syzr5P0mfox9GbxZCALgIAQmM-yM3shR3g1TyfOT4ah1v5DRQAg/s1600/PSS_1_instance.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGQ7AVLo1Z7SQfoCq0Rtwhq6S6Nu31TElo6mbnCuavo-dq-BOucUhA1vzulkhH_ThBUYUI-Nsg9PKWM5UIWcdhyphenhyphentGaxkK0qIEZmqba3WiXnnJGkFDZEYO8D9svf7oTeq0wZ2uiCfMV3gM/s1600/PSS_5_instances.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGQ7AVLo1Z7SQfoCq0Rtwhq6S6Nu31TElo6mbnCuavo-dq-BOucUhA1vzulkhH_ThBUYUI-Nsg9PKWM5UIWcdhyphenhyphentGaxkK0qIEZmqba3WiXnnJGkFDZEYO8D9svf7oTeq0wZ2uiCfMV3gM/s1600/PSS_5_instances.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu6m0pIH952SxrhxTJ8lRRIExNxNY9MZBUBj2p8JvoJoIGBGDhh7guEEFROstfAN6P9rGU6r5_W_NozTWWwCjIe6PaF97VaKqHTMvL6UIUkhaE_lgMyvfgFlWAbQ4EyKvJQE7009zbBlg/s1600/PSS_10_instances.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu6m0pIH952SxrhxTJ8lRRIExNxNY9MZBUBj2p8JvoJoIGBGDhh7guEEFROstfAN6P9rGU6r5_W_NozTWWwCjIe6PaF97VaKqHTMvL6UIUkhaE_lgMyvfgFlWAbQ4EyKvJQE7009zbBlg/s1600/PSS_10_instances.png" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><b> </b> As we can see there are a few interesting results: <ul><li>differences between QmlMiner and QmlMiner with resources compiled in are very small (0-2%) and can be ignored</li>
<li>as the number of processes increase, QmlMiner's PSS lowers faster than elemines's. In case of 10 instances QmlMiner's PSS is already:</li>
<ul><li>1% higher on i5 32bit</li>
<li>6% lower on i7 32bit </li>
<li>16% lower on i5 64bit </li>
<li>33% lower on i7 64bit</li>
</ul><li>elemines consumes more memory than QmlMiner on 64bit platforms (with exception for the one instance test and i5 64bit platform)</li>
<li>in the one-application instance test on 32bit platforms QmlMiners's PSS result is significantly higher (32-36%) but it decreases with number of processes.</li>
</ul><div>The main conclusion is that elemines occupies much more memory in 64bit architecture than QmlMiner (up to 33% more). Additionally it has low ratio of shared-to-private memory and therefore its PSS factor will not decrease much when number of processes (that share common code) increase. On the i5 32bit platform one instance of QmlMiner has 36% higher PSS than elemines, however on i7 64bit platform one of 10 elemines instances has 33% PSS higher PSS than corresponding QmlMiner's instance. We could say that on homogeneous platforms (either Qt for QmlMiner or EFL for elemines), with increasing number of processes based on certain framework, QmlMiner and other applications based on the Qt Quick technology consumes much less memory than elemines thanks to more aggressive code and resource sharing. </div><div><h3><br />
<a href="" name="startupTime"></a>4. Startup time<br />
</h3></div><div><h4><br />
Tools</h4><a href="http://www.kernel.org/doc/man-pages/online/pages/man1/time.1.html">time(1)</a> command was used for measuring of startup time. <span lang="en-US">As before, a light <a href="http://www.icewm.org/">IceWM</a></span><span lang="en-US"> was used with no background user tasks or costly services running to avoid interference with the test. So influence of a desktop such as E17 or KDE Plasma Workspaces has been reduced.</span> A "<i>Warm start</i>" test was performed to measure the "warm" start of application. Following command was used <pre style="background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 99%;"><code style="word-wrap: normal;">for i in {1..100}; \
do /usr/bin/time -f"%S;%U;%e" \
-a -o $csvFile ./ten_runs_with_caches.sh; \
done
</code></pre><i> </i> <i>ten_runs_with_caches.sh</i> script sequentially invokes corresponding binary 10 times. This way it increases test's precision to three digits because <i><a href="http://www.kernel.org/doc/man-pages/online/pages/man1/time.1.html">time(1)</a>'s returns </i>results with 2 digit precision only, what's important because times measured tend to be very small on the modern machines. ,,<i>Cold start</i>" tests were also performed to measure "cold" start of application, <i>ten_runs_without_caches.sh </i>script<i> </i>was used to invoke the corresponding binary with dropping caches before every execution by running: <pre style="background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 99%;"><code style="word-wrap: normal;">/sbin/sysctl -q vm.drop_caches=3 && ./binary</code></pre>So for every application, on every platform (except the i7 64bit), 1000 execution sample have been collected and median counted (I had limited access to i7 64bit test machine and only 250 (25x10) executions sample was gathered). </div><div>To measure the startup time efficiently, I have modified source code of both applications. QmlMiner was forced to exit just before QApplication::exec() function:</div><pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> ...
viewer.show();
exit(0);
return app.exec();
}
</code></pre>and elemines exited just before returning from the gui function: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> ...
evas_object_show(window);
exit(0);
return EINA_TRUE;
}
</code></pre>Additional explanations: <ul><li>Measure unit - seconds</li>
<li>System - total number of CPU-seconds used by the system on behalf of the process (in kernel mode)</li>
<li>User - total number of CPU-seconds that the process used directly (in user mode)</li>
</ul><br />
Following chart shows the summary values for System and User time spent by each application in different environments. <br />
<button id="buttonStartupTimeTable">Show/hide details</button> <div id="startupTimeTable"><div style="text-align: right;"><i>QML App, QML App with compiled-in resources and EFL App startup time on different targets</i></div><table border="2" bordercolor="#000000" cellspacing="0" style="width: 100%;"><tbody>
<tr> <th colspan="2" rowspan="2" width="30%">Measure unit[ms]</th> <th colspan="3">Warm start</th> <th colspan="3">Cold start</th> </tr>
<tr> <td><div style="text-align: center;">System</div></td> <td><div style="text-align: center;">User</div></td> <td><div style="text-align: center;">System<br />
+<br />
User</div></td> <td><div style="text-align: center;">System</div></td> <td><div style="text-align: center;">User</div></td> <td><div style="text-align: center;">System<br />
+<br />
User</div></td> </tr>
<tr> <th rowspan="4" width="10%">i5 32bit<br />
HDD</th> </tr>
<tr> <td>QML App</td> <td><div style="text-align: right;">28</div></td> <td><div style="text-align: right;">124</div></td> <td><div style="text-align: right;">152</div></td> <td><div style="text-align: right;">80</div></td> <td><div style="text-align: right;">162</div></td> <td><div style="text-align: right;">242</div></td> </tr>
<tr> <td>QML App with compiled-in resources</td> <td><div style="text-align: right;">27</div></td> <td><div style="text-align: right;">123</div></td> <td><div style="text-align: right;">150</div></td> <td><div style="text-align: right;">80</div></td> <td><div style="text-align: right;">163</div></td> <td><div style="text-align: right;">243</div></td> </tr>
<tr> <td>EFL App</td> <td><div style="text-align: right;">20</div></td> <td><div style="text-align: right;">92</div></td> <td><div style="text-align: right;">112</div></td> <td><div style="text-align: right;">74</div></td> <td><div style="text-align: right;">123.5</div></td> <td><div style="text-align: right;">197.5</div></td> </tr>
<tr> <th rowspan="4">i7 32bit<br />
SSD</th> </tr>
<tr> <td>QML App</td> <td><div style="text-align: right;">17</div></td> <td><div style="text-align: right;">97</div></td> <td><div style="text-align: right;">114</div></td> <td><div style="text-align: right;">47.5</div></td> <td><div style="text-align: right;">98</div></td> <td><div style="text-align: right;">145.5</div></td> </tr>
<tr> <td>QML App with compiled-in resources</td> <td><div style="text-align: right;">18</div></td> <td><div style="text-align: right;">97</div></td> <td><div style="text-align: right;">115</div></td> <td><div style="text-align: right;">47</div></td> <td><div style="text-align: right;">98</div></td> <td><div style="text-align: right;">145</div></td> </tr>
<tr> <td>EFL App</td> <td><div style="text-align: right;">14</div></td> <td><div style="text-align: right;">67</div></td> <td><div style="text-align: right;">81</div></td> <td><div style="text-align: right;">38</div></td> <td><div style="text-align: right;">60</div></td> <td><div style="text-align: right;">98</div></td> </tr>
<tr> <th rowspan="4">i5 64bit<br />
HDD</th> </tr>
<tr> <td>QML App</td> <td><div style="text-align: right;">14</div></td> <td><div style="text-align: right;">91</div></td> <td><div style="text-align: right;">105</div></td><td><div style="text-align: right;">55</div></td> <td><div style="text-align: right;">116</div></td> <td><div style="text-align: right;">171</div></td> </tr>
<tr> <td>QML App with compiled-in resources</td> <td><div style="text-align: right;">15</div></td> <td><div style="text-align: right;">91</div></td> <td><div style="text-align: right;">106</div></td> <td><div style="text-align: right;">55</div></td> <td><div style="text-align: right;">115</div></td> <td><div style="text-align: right;">170</div></td> </tr>
<tr> <td>EFL App</td> <td><div style="text-align: right;">14</div></td> <td><div style="text-align: right;">56</div></td> <td><div style="text-align: right;">70</div></td> <td><div style="text-align: right;">55</div></td> <td><div style="text-align: right;">86</div></td> <td><div style="text-align: right;">141</div></td> </tr>
<tr> <th rowspan="4">i7 64bit<br />
HDD</th> </tr>
<tr> <td>QML App</td> <td><div style="text-align: right;">14</div></td> <td><div style="text-align: right;">90</div></td> <td><div style="text-align: right;">104</div></td> <td><div style="text-align: right;">46</div></td> <td><div style="text-align: right;">106</div></td> <td><div style="text-align: right;">152</div></td> </tr>
<tr> <td>QML App with compiled-in resources</td> <td><div style="text-align: right;">15</div></td> <td><div style="text-align: right;">91</div></td> <td><div style="text-align: right;">105</div></td> <td><div style="text-align: right;">47</div></td> <td><div style="text-align: right;">106</div></td> <td><div style="text-align: right;">153</div></td> </tr>
<tr> <td>EFL App</td> <td><div style="text-align: right;">24</div></td> <td><div style="text-align: right;">83</div></td> <td><div style="text-align: right;">107</div></td> <td><div style="text-align: right;">58</div></td> <td><div style="text-align: right;">87</div></td> <td><div style="text-align: right;">145</div></td> </tr>
</tbody></table></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQHPZvbJGhm4pOyE0kvbZURCjXUc0OfMTDVaO9TMan2UPiRxFrchiUnBHrn2rge6oeaT6snTIfssyRCtTixHnNaP4JSbm0rm2K58JtLr9IS2xR4sctoVABHiGuN2GIhPyNL2_hqX_vRA/s1600/StartupTimeStats.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="534" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQHPZvbJGhm4pOyE0kvbZURCjXUc0OfMTDVaO9TMan2UPiRxFrchiUnBHrn2rge6oeaT6snTIfssyRCtTixHnNaP4JSbm0rm2K58JtLr9IS2xR4sctoVABHiGuN2GIhPyNL2_hqX_vRA/s640/StartupTimeStats.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div>There is no significant difference between startup times of both version of QmlMiner. I suppose that if the test was performed on embedded devices more dissimilarity could be seen. Relative difference between QmlMiner and elemines is very varied between the test cases. On i5 64bit warm run test QmlMiner starts 50% slower than elemines but considering absolute values it's only 35 ms (in other cases it varies from 30 to 47.5 ms). I have expected much higher differences because Qt has to initialize the QML engine, the JavaScript engine, and has to parse and compile qml source files to the QML bytecode. On the i7 64bit warm run test QmlMiner starts 2% faster than elemines. It could be caused by more recent EFL version used to compile elemines (1.7.99 than on other platforms 1.7.4 and 1.7.5) Another notice is that 64bit builds of the applications start faster than their 32bit builds. <br />
<br />
<h3>Summary: </h3><br />
I am amazed how quickly QmlMiner could be implemented. Originally it even offered some hidden features but I removed them on purpose because QmlMiner should be as similar to the EFL-based elemines as possible while doing comparison. For example the QtQuick implementation has a dimension parameter which could change number of dashboard elements (I have played on 50x50 board). One can also change number of bombs using a "bombCount" parameter. Taking more scientific approach while comparing developer experience average-bug-count-per-1000-lines metric could be used as a point for QtQuick. Specifics of C language are used in various models when estimating workload of C-based projects, e.g. COCOMO in the SLOCCount tool. There is no estimation for the QML language as of now but most software engineers accustomed with the topic would say that QML is clearly a higher-level language than C, so writing application in QML is much more organized and less error prone than doing so in plain C. While I suppose that EFL edc file includes some declarative code for application's behavior unfortunately I could not spot anything in the code. I did not go through EFL docs and I am not sure if I will do this in future. You are welcome to do so. The startup times are relatively short for both applications (the highest difference is 47.5 ms). Proportional memory consumption is comparable and QtQuick has advantage on homogenous platforms - thanks to full portability (binary independence). It also performs well on 64bit architectures. In such basic applications there is no possibility of measuring performance perhaps other than FPS on resizing. I have noticed issues with elemines resizing (slow refreshing of the window's content). I have asked a question (<a href="http://sourceforge.net/mailarchive/forum.php?thread_name=CAD29Lf5mCL0LGwYERAoHSi--%3DgVY0tFiSjLaQC6qu8gV4Ym5dw%40mail.gmail.com&forum_name=enlightenment-users">on the enlightenment forum</a>) about this issue (which could be caused by broken compilation of EFL) but I am still waiting for precise answer. <div lang="en-US" style="margin-bottom: 0cm;">All this looks like a big eye-opener for QtQuick skeptics especially because I was comparing:</div><ol><li><span lang="en-US">QtQuick app that uses QML code for system-independent virtual-machine-based runtime, parsed/compiled to a bytecode at runtime (details for QML2 at </span><a href="http://www.kdab.com/qml-engine-internals-part-1-qml-file-loading/">http://www.kdab.com/qml-engine-internals-part-1-qml-file-loading/</a><span lang="en-US">) and business logic is written in JavaScript. Using Qt/C++ here is possible for performance reasons but that wasn't necessary for this test.</span></li>
<li><span lang="en-US">EFL app written in plain C code, optimized at compile time by GCC, possibly for given CPU and operating system, with business logic written in C as well. (Note: there is elev8, early effort of JavaScript bindings for EFL but it's not mentioned in the official documentation. Unless such projects reach stable milestone, I see EFL's approach to GUI programming as more compiled-in or “static” than QtQuick's approach). EFL's </span><span lang="en-US"><i>elementary</i></span><span lang="en-US"> graphical framework is not extensible at runtime so new components cannot be added without going back to C compiler.</span></li>
</ol><div lang="en-US" style="margin-bottom: 0cm;">Taking these points into account it is surprising to see QtQuick app performing similarly to C-based app made in EFL. In addition, QtQuick introduces useful features not present in the EFL app (binary-independence, network transparency, safer memory operations) without sacrificing performance (compared to EFL). Furthermore these tests can be repeated for Qt 5/QML2 which is reportedly even more optimized. </div>If you are EFL or QML expert or enthusiast, feel free to send me your notes or correction for any aspect covered by this article or methodology used for collecting the data. The QmlMiner app is available in my KDE scratch git repository at: <a href="http://quickgit.kde.org/?p=scratch/tolszak/qmlminer.git">http://quickgit.kde.org/?p=scratch/tolszak/qmlminer.git</a> It can be compiled with qmake or just run with qmlviewer (with QmlMiner.qml as an argument). The main.cpp file was added only as optimization to avoid running the full qmlviewer tool while performing comparisons since EFL has no adequate runtime tool (edc files are compiled to a binary). All data used for this article (startup times, memory consumption some summaries in *ods files) can be fetched from QmlMinerArticleData git repository: <a href="http://quickgit.kde.org/?p=scratch/tolszak/QmlMinerArticleData.git">http://quickgit.kde.org/?p=scratch/tolszak/QmlMinerArticleData.git</a>) <script>
$("#buttonMemoryTable").click(function () {$("#memoryTable").toggle(500);});
$("#memoryTable").hide();
$("#buttonLinesOfCodeTable").click(function () {$("#linesOfCodeTable").toggle(500);});
$("#linesOfCodeTable").hide();
$("#buttonStartupTimeTable").click(function () {$("#startupTimeTable").toggle(500);});
$("#startupTimeTable").hide();
</script>Anonymoushttp://www.blogger.com/profile/14511560056411781713noreply@blogger.com21