<?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[Thread langsamer als Application-&amp;gt;ProcessMessage!?]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>in meinen Programm hab ich einen Teil in einen Thread ausgekoppelt. Das ganze läuft auch wunderbar. Allerdings ist es sehr viel langsamer im Vergleich zu vorher als ich in der for-Schleife noch mit Application-&gt;ProcessMessage gearbeitet hatte. Hab im Thread auch alles synchronisiert.</p>
<p>Kennt jemand das Problem und vielleicht einen Lösungsansatz?</p>
<p>Mfg<br />
Jack84</p>
<p>PS.: Die Vorteile eines Threads sind mir bewusst, allerdings ist es in meinen Augen nicht tragbar, wenn ein Programm dadurch um etwa die Hälfte langsamer läuft.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/113304/thread-langsamer-als-application-gt-processmessage</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 07:02:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/113304.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Jun 2005 14:55:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Tue, 21 Jun 2005 14:55:49 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>in meinen Programm hab ich einen Teil in einen Thread ausgekoppelt. Das ganze läuft auch wunderbar. Allerdings ist es sehr viel langsamer im Vergleich zu vorher als ich in der for-Schleife noch mit Application-&gt;ProcessMessage gearbeitet hatte. Hab im Thread auch alles synchronisiert.</p>
<p>Kennt jemand das Problem und vielleicht einen Lösungsansatz?</p>
<p>Mfg<br />
Jack84</p>
<p>PS.: Die Vorteile eines Threads sind mir bewusst, allerdings ist es in meinen Augen nicht tragbar, wenn ein Programm dadurch um etwa die Hälfte langsamer läuft.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/814171</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/814171</guid><dc:creator><![CDATA[Jack84]]></dc:creator><pubDate>Tue, 21 Jun 2005 14:55:49 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Tue, 21 Jun 2005 14:59:38 GMT]]></title><description><![CDATA[<p>Jack84 schrieb:</p>
<blockquote>
<p>Hab im Thread auch alles synchronisiert.</p>
</blockquote>
<p>definiere &quot;Alles&quot;...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/814178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/814178</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Tue, 21 Jun 2005 14:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Tue, 21 Jun 2005 18:17:25 GMT]]></title><description><![CDATA[<p>Es ist der einzige Thread den ich in meiner Anwendung habe.<br />
Synchronisiert wird &quot;Form-&gt;Update()&quot;.</p>
<p>MfG<br />
Jack84</p>
]]></description><link>https://www.c-plusplus.net/forum/post/814313</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/814313</guid><dc:creator><![CDATA[Jack84]]></dc:creator><pubDate>Tue, 21 Jun 2005 18:17:25 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Wed, 22 Jun 2005 05:58:47 GMT]]></title><description><![CDATA[<p>Wieso rufst du das Zeichnen des Forms synchron zum Thread auf? Da wunderts ja nciht weiter, wenn der Thread langsamer wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/814507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/814507</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Wed, 22 Jun 2005 05:58:47 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Wed, 22 Jun 2005 07:15:34 GMT]]></title><description><![CDATA[<p>Erstmal Danke.<br />
Aber auch, wenn ich dieses nicht synchronisiere ist es trotzdem noch viel langsamer. Ich poste heute oder morgen den Code, den ich verwende.</p>
<p>MfG<br />
Jack84</p>
]]></description><link>https://www.c-plusplus.net/forum/post/814538</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/814538</guid><dc:creator><![CDATA[Jack84]]></dc:creator><pubDate>Wed, 22 Jun 2005 07:15:34 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Thu, 23 Jun 2005 07:27:21 GMT]]></title><description><![CDATA[<p>Hier der Code des Threads:</p>
<pre><code>[cpp]__fastcall TOpenThread::TOpenThread(bool CreateSuspended)
        : TThread(CreateSuspended)
{
        Priority = tpTimeCritical;//es ist egal welche Priorität ich setze. Die Geschwindigkeit ist gleich.
        FreeOnTerminate = true;

}[/cpp]
</code></pre>
<p>Hier die Execute-Fkt (Habe es ein wenig gekürzt, aber das ist der witchtigste Teil):</p>
<pre><code>[cpp]for (int i=0;i&lt;=LoadData-&gt;Count;i=i+9)//LoadData ist eine StrigList, die vorher eingelesen wurde.
        {
                ListItem = Mainscreen-&gt;ListView1-&gt;Items-&gt;Add();
                ListItem-&gt;Caption = LoadData-&gt;Strings[i];
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+1]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+2]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+3]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+4]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+5]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+6]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+7]);
                ListItem-&gt;SubItems-&gt;Add(LoadData-&gt;Strings[i+8]);
                if (Mainscreen-&gt;Abbruch == true)
                {
                        Abort();
                }
                Synchronize(GuiElements);//auch ohne die Snychronisation bleibt die langsame Geschwindigkeit
        }[/cpp]
</code></pre>
<p>Hier noch die Synchronisation:</p>
<pre><code>[cpp]void __fastcall TOpenThread::GuiElements()
{ 
        Mainscreen-&gt;Update();
}
[/cpp]
</code></pre>
<p>Hoffe ihr könnt mir damit weiterhelfen.</p>
<p>Gruß<br />
Jack84</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815286</guid><dc:creator><![CDATA[Jack84]]></dc:creator><pubDate>Thu, 23 Jun 2005 07:27:21 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Thu, 23 Jun 2005 07:51:00 GMT]]></title><description><![CDATA[<p>Ob das Befüllen einer ListView aus einem Thread heraus sinnvoll ist, oder nicht, sei mal dahingestellt.<br />
Schau Dir mal TListItems::BeginUpdate() und ::EndUpdate() an...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815307</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 23 Jun 2005 07:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Thu, 23 Jun 2005 08:59:50 GMT]]></title><description><![CDATA[<p>Und abgesehen von Joe_Ms Hinweis (der übrigens mit ein Grund sein kann für langsame Verabreitung, weil das Listview sich bei jedem add neu zeichnen will, was zeit kostet) solltest du von TimeCritical alsPriorität für einen Thread eigentlich absehen. Oft reicht schon die Priorität &quot;higher&quot;... und selbstdie scheint mir für diese Aufgabe übertrieben...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815346</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Thu, 23 Jun 2005 08:59:50 GMT</pubDate></item><item><title><![CDATA[Reply to Thread langsamer als Application-&amp;gt;ProcessMessage!? on Thu, 23 Jun 2005 09:57:28 GMT]]></title><description><![CDATA[<p>@Joe_M.: Danke für den Tipp. Werds mir heut mittag näher anschauen.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/760">@junix</a>: Die Priorität hat, wie ich ja schon geschrieben hatte, gar keine (erkennbare) Auswirkung auf die Geschwindigkeit. Hatte sie nur so hoch gesetzt, um zu testen, ob dadurch die Geschwindigkeit erhöht wird.</p>
<p>Ich danke euch beiden aber schonmal für die schnelle Hilfe!!!</p>
<p>Gruß<br />
Jack84</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815400</guid><dc:creator><![CDATA[Jack84]]></dc:creator><pubDate>Thu, 23 Jun 2005 09:57:28 GMT</pubDate></item></channel></rss>