<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Rebar creation performance and memory usage in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8706853#M43316</link>
    <description>&lt;P&gt;No one can say a certain thing without looking at the source code.&lt;/P&gt;
&lt;P&gt;You said when creating the rebars each created rebar took more time before others. There is a possibility, you create more than one rebar in the same location. Did you check the created rebars? Is there any overlap?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is nothing something like that. When you create 50m long girder, you can stop the code in the middle of the loop for a fair amount of time with this code&lt;/P&gt;
&lt;PRE&gt;System.Threading.Thread.Sleep(sleep time (milisecond))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If none of them is helpful, you should post some of your code to check the problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Recep.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2019 09:50:49 GMT</pubDate>
    <dc:creator>recepagah12</dc:creator>
    <dc:date>2019-04-04T09:50:49Z</dc:date>
    <item>
      <title>Rebar creation performance and memory usage</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8706282#M43315</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all, I am creating a box girder bridge. The box girder is about 50 meters long and has a bit complex geometry shape which I created using DirectShape. I need to create about 2000 rebars for the girder. The problem is that if I use the 50 meters long girder as the host element for the rebars, the creation time is very long (about 45 minutes), and the memory (RAM) used is about 31 GB which is very close to hardware RAM limit of my computer (32 GB), and often Revit just crashes. If I use a small part of the girder (1 meter long) as the host element, the rebar creation time is about only 5 minutes and the RAM used is about 11 GB. However, a lot of longitudinal rebars span about 50 meters, and I can not divide them into small segements. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Even when I use 1 meter girder as the host element, if I add 2000 more rebars, the total creation time (for 4000 rebars) becomes 35 minutes and the RAM usage is about 13 GB. My code creates all these rebars in a loop. I output the creation time of each rebar to a text file and found that the creation time becomes longer and longer for similar rebars as the loop goes on. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please give me some suggestions. Is this related to the garbage collection? Do I have to manually do the garbage collection in my code?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 03:49:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8706282#M43315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-04T03:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar creation performance and memory usage</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8706853#M43316</link>
      <description>&lt;P&gt;No one can say a certain thing without looking at the source code.&lt;/P&gt;
&lt;P&gt;You said when creating the rebars each created rebar took more time before others. There is a possibility, you create more than one rebar in the same location. Did you check the created rebars? Is there any overlap?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is nothing something like that. When you create 50m long girder, you can stop the code in the middle of the loop for a fair amount of time with this code&lt;/P&gt;
&lt;PRE&gt;System.Threading.Thread.Sleep(sleep time (milisecond))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If none of them is helpful, you should post some of your code to check the problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Recep.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 09:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8706853#M43316</guid>
      <dc:creator>recepagah12</dc:creator>
      <dc:date>2019-04-04T09:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rebar creation performance and memory usage</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8713290#M43317</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your suggestions. I tried Thread.Sleep, but it could not lower the memory usage or improve the performance. I may have to rearrange my model to make the rebar host element as ‘light’ as possible. I can not understand why the rebar creation performance is affected by the host element so much. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 23:54:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rebar-creation-performance-and-memory-usage/m-p/8713290#M43317</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-07T23:54:25Z</dc:date>
    </item>
  </channel>
</rss>

