[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [GT] Q re max-loaded-items
> 1. display_indicator.pl and display_signal.pl use nb-item to do what
max-loaded-items does in graphics.pl
You're right, I hadn't noticed that. I think your ideia of standardizing
these variables across scripts is the way to go. My suggestion is to use
max_loaded_items to determine how many records to load from the db and
nb_item to determine how many records to display.
A reason why it's necessary to have two different variables is that GT may
need to create a timeframe based on existing data. Say your database has
daily data and you want to display weekly prices. If nb-items is 100,
max-loaded-items must be 500 or more.
> 2. just loading the last n items does not guarantee that you get sensible
results if your analysis has dependencies stretching beyond that. There are
no checks on whether we have loaded enough data.
I created max_loaded_items for performance reasons while dealing with very
large intraday datasets. So yeah, ur supposed to know what ur doing. My
EURUSD 1Minute database has over 2.000.000 records. GT stops working if it
loads all of them into memory. And that's not even tick data yet :)
> As I said, I wonder whether we should advertise this option. I am not
saying we should delete it, but as max-loaded-items is not documented, maybe
we should leave it undocumented to preserve flexibility in the future.
I think we should document it, at least in the modules documentation. Some
months ago GT was mentioned in the Oanda forums by people discussing forex
API trading. If they were to use GT for that purpose, max_loaded_items
would be necessary.
> > -----Original Message-----
> > From: João Costa [mailto:joaocosta
AT
zonalivre.org]
> > Sent: Sunday, March 30, 2008 11:02 PM
> > To: devel
AT
geniustrader.org
> > Subject: RE: [GT] Q re max-loaded-items
> >
> > I just read some of these messages recently, but let me share some
> > thoughts
> > even if late.
> >
> > As far as I understand, the difference between nb-items and
max-loaded-
> > items
> > is/was as following:
> >
> > max-loaded-items limits the number of records loaded from the
database
> > into
> > the Prices object. it can be useful for performance reasons, as it
limits
> > the amount of memory used. only the genericdbi db object actually
uses
> > this, other db objects load the entire available dataset into memory)
> >
> > nb-items simply limits the number of items outputted in some scripts
> > (display_indicator.pl, graphic.pl). It has no effect on memory.
> >
> >
> > I understand you were dealing with inconsistencies in the use of
these
> > across scripts. Haven't checked the applied patches, but think that's
a
> > really good ideia.