<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Memory usage spike with Qt3D]]></title><description><![CDATA[<p dir="auto">Dear all,</p>
<p dir="auto">in one of the software I'm responsible, I'm trying to get rid of an outdated version of 3D visualisation library and would like to use Qt3D to do the job.<br />
I started with a simple (at least that's what I though) application: points in space are generated and their colour should change according to some criteria. Before I used 2 projections and QGraphicsView to represent the data.<br />
I am on Windows 10, using MSVC 2013 with Qt 5.6.2 64bits.<br />
For each generated points I use a spherical mesh (the same for each point), set the material and transformation. The thing I see is that for about 1300 points the memory usage for the application goes up to something like 2 GB, but after a while it goes down to something like 80 MB!</p>
<p dir="auto">I could imagine 1300 meshes are a lot, this is why I only use 1 instance of <code>QSphereMesh</code> and <code>QPhongMaterial</code> (I only use 1 colour at this stage) which are used by my 1300 <code>QEntity</code> instances, and I reduced the spherical mesh quality (anyway they will be looked at from far away). But still I find a bit odd that the memory behaves like this.</p>
<p dir="auto">Is this normal? If yes, is there smarter way of coding this in order to reduce the initial memory usage?</p>
<p dir="auto">Please find a test project illustrating the aforementioned behaviour:<br />
<a href="https://pastebin.com/VaDemwsD" target="_blank" rel="noopener noreferrer nofollow ugc">.pro file</a><br />
<a href="https://pastebin.com/PCwMh9HE" target="_blank" rel="noopener noreferrer nofollow ugc">Windows.h</a><br />
<a href="https://pastebin.com/BjDf5rZw" target="_blank" rel="noopener noreferrer nofollow ugc">Windows.cpp</a><br />
<a href="https://pastebin.com/HP4ykwHf" target="_blank" rel="noopener noreferrer nofollow ugc">mainwindow.h</a><br />
<a href="https://pastebin.com/YpsBYkvA" target="_blank" rel="noopener noreferrer nofollow ugc">mainwindow.cpp</a><br />
<a href="https://pastebin.com/mWhwzRRb" target="_blank" rel="noopener noreferrer nofollow ugc">main.cpp</a></p>
]]></description><link>https://forum.qt.io/topic/84287/memory-usage-spike-with-qt3d</link><generator>RSS for Node</generator><lastBuildDate>Tue, 04 Aug 2026 08:26:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/84287.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Oct 2017 12:51:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Memory usage spike with Qt3D on Wed, 18 Oct 2017 13:48:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> You've just made my day!<br />
Now the scene is rendered immediately and memory an initialisation is about 180 MB for ~1300 meshes.</p>
]]></description><link>https://forum.qt.io/post/421581</link><guid isPermaLink="true">https://forum.qt.io/post/421581</guid><dc:creator><![CDATA[JohanSolo]]></dc:creator><pubDate>Wed, 18 Oct 2017 13:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to Memory usage spike with Qt3D on Wed, 18 Oct 2017 13:26:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> said in <a href="/post/421576">Memory usage spike with Qt3D</a>:</p>
<blockquote>
<p dir="auto">Hi,</p>
<p dir="auto">If possible, try with the latest LTS: 5.9. There's work that has been done to improve both CPU and memory consumption.</p>
</blockquote>
<p dir="auto">I'll give a try and let you know. Thing is the Qt3D part seems not to be compatible (as far as I've seen) between 5.6.2 and 5.9.1</p>
]]></description><link>https://forum.qt.io/post/421578</link><guid isPermaLink="true">https://forum.qt.io/post/421578</guid><dc:creator><![CDATA[JohanSolo]]></dc:creator><pubDate>Wed, 18 Oct 2017 13:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to Memory usage spike with Qt3D on Wed, 18 Oct 2017 13:13:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">If possible, try with the latest LTS: 5.9. There's work that has been done to improve both CPU and memory consumption.</p>
]]></description><link>https://forum.qt.io/post/421576</link><guid isPermaLink="true">https://forum.qt.io/post/421576</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 18 Oct 2017 13:13:20 GMT</pubDate></item></channel></rss>