[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Why does it take so long to apply edits?



PureBytes Links

Trading Reference Links

Tomasz,

As time has gone on, I have increased the complexity of my AFL to  
2500 lines and my database to 200K.  The time to apply edits has also  
gone up to 8 minutes even though I have wrapped the code so that most  
only executes in indicator mode.  Finally today I became frustrated  
enough to track down the offending AFL.  I started by commenting out  
my entire AFL.  Time to apply --4 minutes for 2500 lines of  
comments!  I am at a loss for how to track down what is causing the  
long apply edits now.  Do you know how I might approach this?

Best regards,
Dennis

On Sep 4, 2007, at 9:16 PM, Dennis Brown wrote:

> Tomasz,
>
> Thank you for your insights.
>
> I wrapped my code today as you suggested below and in an earlier post
> today, so unwrapped are only the uncalled functions and a few
> variables initialized to keep out syntax errors.  I am using a 90,000
> bar 5 second database, but the chart timeframe is run at about 7,000
> bars, and my complex loop processing is limited by parameter to less
> than 2,000 bars.  Changing that parameter to 200 bars reduces the
> execution time from 1 second to .2 seconds, but as you suggested,
> does not seem to have much affect on the apply time --which now
> varies from 35 to 65 seconds.  I also tried different tickers with
> fewer bars (30,000) and it did made the apply time longer.  So I
> would say my edit apply time is no longer dependent on my database
> size or AFL complexity.
>
> Even though I am glad to have under a minute apply time now, it seems
> as though there is still something else that is slowing it down.  Do
> any other possibilities come to mind?
>
> One thing that I noticed, is that it is a consistent 35 seconds to
> apply when I start up AB and just do a lot of applies.  Switching
> symbols, more edits, enabling complex AFL sections, etc. cause the
> time to lengthen up to the 55 second area and it does not go back
> down until I quit AB.  I am guessing that these things take memory
> that does not get released and it reduces the RAM available for
> processing the apply.
>
> PS.  When I turn on ALL of my formula (enabled in sections with
> multiple timeframes and indicators) it takes about 5 seconds to
> execute with all the speed-up tricks so far --which is why I am
> obsessed with getting the most speed I can out of AFL by clever
> programming tricks.
>
> Best regards,
> Dennis
>
> On Sep 4, 2007, at 6:00 PM, Tomasz Janeczko wrote:
>
>> Dennis,
>>
>> If you are "applying" the code - it is for the first time executed
>> with ALL bars, regardless of QuickAFL and SetBarsRequired settings.
>>
>> Now *if* your formula is complex and uses looping and you are using
>> for example tick database with hundreds of thousands of bars
>> it may take a while. Usually it is non-issue as people are not
>> using such complex formulas.
>> (1 second is *very* long for execution under normal circumstances.
>> My formulas usually execute well below 0.1 sec).
>>
>> You may wrap your code into
>>
>> if( Status("action")==actionIndicator)
>> {
>> ...
>> }
>>
>> and this will prevent this effect.
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message -----
>> From: "Dennis Brown" <see3d@xxxxxxxxxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Tuesday, September 04, 2007 11:25 PM
>> Subject: [amibroker] Why does it take so long to apply edits?
>>
>>
>>> Hello,
>>>
>>> I have noticed that the time it takes to apply an edit to my large
>>> indicator AFL takes a long but variable amount of time.  It might
>>> take 15 seconds one time and 3 minutes another time.  It usually
>>> takes about 2.5 minutes to apply an edit, though if there is a  
>>> syntax
>>> error, it comes back right away.  The AFL itself has an execution of
>>> about 1 second per pass and starts up right away from scratch.
>>>
>>> I was wondering if there were any general rules that I should be
>>> aware of that would make applying edits faster and more consistent?
>>>
>>> Another thing that is interesting is that if I click anywhere on the
>>> chart or UI while the edit is being applied, it runs even slower,  
>>> and
>>> always resets all the params.
>>>
>>> Insights anyone?
>>>
>>> Thanks,
>>> Dennis
>>>
>>>
>>>
>>> Please note that this group is for discussion between users only.
>>>
>>> To get support from AmiBroker please send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> For other support material please check also:
>>> http://www.amibroker.com/support.html
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>
>>
>> Please note that this group is for discussion between users only.
>>
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/