<?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 Efficiency of Script for speed in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/602950#M6601</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created an object that is quite slow on loading and changes. I read in the past about speeding up script by using a _ before a variable to constrain the the GDL reader to only look for a variable within that page. Does this speed up the processing time? Are there any other ways to speed up the processing time of the script?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the _ addition before a variable, is it true that it works only in the same page of the script e.g. when in the Masterscript page:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;variable1 = input1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Would this search all pages including Master, 2D, 3D, Parameter, Interface pages?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;variable1 = _input1&amp;nbsp; &amp;nbsp; &amp;nbsp; ! Would this search only within the Master page?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance, Matt&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 11:06:32 GMT</pubDate>
    <dc:creator>GDL Enthusiast</dc:creator>
    <dc:date>2024-09-26T11:06:32Z</dc:date>
    <item>
      <title>Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/602950#M6601</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created an object that is quite slow on loading and changes. I read in the past about speeding up script by using a _ before a variable to constrain the the GDL reader to only look for a variable within that page. Does this speed up the processing time? Are there any other ways to speed up the processing time of the script?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the _ addition before a variable, is it true that it works only in the same page of the script e.g. when in the Masterscript page:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;variable1 = input1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Would this search all pages including Master, 2D, 3D, Parameter, Interface pages?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;variable1 = _input1&amp;nbsp; &amp;nbsp; &amp;nbsp; ! Would this search only within the Master page?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance, Matt&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:06:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/602950#M6601</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-09-26T11:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/602975#M6602</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/12479"&gt;@GDL Enthusiast&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I read in the past about speeding up script by using a _ before a variable to constrain the the GDL reader to only look for a variable within that page. Does this speed up the processing time?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have not heard of this.&lt;/P&gt;
&lt;P&gt;As far as I know, it will not make any difference, and is just a naming convention so you can easily tell in the script that it is a parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The question is, why do you need to state that variable1 = input1 ?&lt;/P&gt;
&lt;P&gt;If that is always the case then just use input1.&lt;/P&gt;
&lt;P&gt;But if somewhere else in the script variable1 = input2, then that could be a valid thing to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the efficiency of your script, it is really hard to say without seeing it.&lt;/P&gt;
&lt;P&gt;One thing I can recommend is to do all calculations once in the master script.&lt;/P&gt;
&lt;P&gt;All script will refer to the master script, so there is no need to perform the same calculations in 2D, 3D and other scripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 01:03:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/602975#M6602</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-05-08T01:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603046#M6603</link>
      <description>&lt;P&gt;tl;dr You have got everything wrong, but luck prevented that library part from reporting an error. Period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Long Version,&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Learn the difference between Parameters and Variable, both are the same, but their scope is different.&lt;/LI&gt;
&lt;LI&gt;The underscore "_" and the double-underscore "__" is a styling convention for GDL script, where the underscore "_" prefix is to indicate that this is a variable, and the double-underscore "__" prefix is a variable within a subroutine. Also return to point 1.&lt;/LI&gt;
&lt;LI&gt;Speed issue. You simple have got so lucky to get the results that you have got. Usually these changes cause the GDL Editor to throw errors because the script would not work.&lt;/LI&gt;
&lt;LI&gt;Unless you have hit some of the old (really old) parameters that GDL can get out the program (which I don't believe you have done), then you were quick lucky (see point 3), and even then, those parameters use the tilde as a prefix " ~ "&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 08 May 2024 09:06:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603046#M6603</guid>
      <dc:creator>Nader Belal</dc:creator>
      <dc:date>2024-05-08T09:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603047#M6604</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/10251"&gt;@Nader Belal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Unless you have hit some of the old (really old) parameters that GDL can get out the program (which I don't believe you have done), then you were quick lucky (see point 3), and even then, those parameters use the tilde as a prefix " ~ "&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean the old GLOBAL variables?&lt;/P&gt;
&lt;P&gt;If so, that is the suffix and not the prefix.&lt;/P&gt;
&lt;P&gt;And they can be either underscore _ or tilde ~&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A_ = GLOB_SCALE&lt;/P&gt;
&lt;P&gt;A~ = WALL_FILL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 09:13:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603047#M6604</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-05-08T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603139#M6607</link>
      <description>&lt;P&gt;May be. I was talking out of my memory without consulting the Manual&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 17:37:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603139#M6607</guid>
      <dc:creator>Nader Belal</dc:creator>
      <dc:date>2024-05-08T17:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603151#M6608</link>
      <description>&lt;P&gt;Thank you so much for your response Barry. I am glad I didn't go down the road of using _ to speed up the script and all the work the renaming! Best regards, Matt&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 20:10:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603151#M6608</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-05-08T20:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603156#M6609</link>
      <description>&lt;P&gt;Hi Nader,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like the&amp;nbsp;&lt;SPAN&gt;tl;dr, haha it doesn't surprise me&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for all the points, super helpful! I am glad to know the&amp;nbsp;underscore "_" and the double-underscore "__" doesn't keep it local. Saved me a mountian of recoding!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards, Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 21:34:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603156#M6609</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2024-05-08T21:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of Script for speed</title>
      <link>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603220#M6610</link>
      <description>&lt;P&gt;Variables can and will be local if they are bounded within a subroutine, unless they were predefined (or initiated) before the definition of a subroutine&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 07:59:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Efficiency-of-Script-for-speed/m-p/603220#M6610</guid>
      <dc:creator>Nader Belal</dc:creator>
      <dc:date>2024-05-09T07:59:38Z</dc:date>
    </item>
  </channel>
</rss>

