Response inline...

Thank you for the help,

John

On Jul 13, 6:17 pm, Mark Mandel <[email protected]> wrote:
> You can disable caching.. but it's an overall setting, it's not per request

yup, I found the doc for tweaking the cache settings in transfer.xml

> (eek.. that's scary).

If I may ask, why is temporarily disabling caching scary?

>
> All you can really do is discard objects you don't want to be cached for an
> extended period.

Ah, okay. I suppose I will have to write up the importer then. Darn...

>
> Mark
>
>
>
>
>
> On Tue, Jul 14, 2009 at 11:15 AM, John Watson <[email protected]> wrote:
>
> > Ah, makes sense.
>
> > Will there be a way to disable caching in the future?
> > Either for the entire request, some way of toggling during the
> > request, or flagging that you don't want the object to be cache.
>
> > John
>
> > On Jul 13, 6:02 pm, Mark Mandel <[email protected]> wrote:
> > > In all seriousness - I wouldn't use Transfer for batch/bulk data import
> > > operations, I would just use straight SQL.
>
> > > The fact that there is a cache there means it gets really, really, really
> > > full as you insert new objects every time.
>
> > > That being said - I have seen people do this, but just discard the
> > imported
> > > object after they are done, and it has worked reasonably well, if time is
> > > not a concern.
>
> > > Mark
>
> > > On Tue, Jul 14, 2009 at 10:55 AM, John Watson <[email protected]>
> > wrote:
>
> > > > transfer.xml excerpt:
> > > > <object name="invoice" table="tblInvoices">
> > > >  <id name="invoiceId" type="numeric" />
> > > >  <property name="invoiceNum" type="numeric" />
> > > >  <property name="invoiceDate" type="date" />
> > > >  <onetomany name="invoiceItem" lazy="true" proxied="true">
> > > >    <link to="invoiceItem" column="fk_invoiceId" />
> > > >    <collection type="array" />
> > > >  </onetomany>
> > > > </object>
> > > > <object name="invoiceItem" table="tblInvoiceItems">
> > > >  <id name="invoiceItemId" type="numeric" />
> > > >  <property name="itemDesc" type="string" />
> > > >  <property name="itemCost" type="numeric" />
> > > > </object>
>
> > > > I'm then looping through a CSV file that contains a line of
> > > > "invoiceNum,invoiceDate,itemDesc,itemCost"
>
> > > > read-in-csv
> > > > loop-start
> > > >  attempt to get invoice object
> > > >  if not persisted
> > > >   set invoiceDate
> > > >   save invoice object
> > > >  end if
>
> > > >  new invoiceItem object
> > > >  set itemDesc
> > > >  set itemCost
> > > >  set parentInvoice to invoice
> > > >  save invoiceItem
> > > > loop-end
>
> > > > For ~500 invoiceItems, this does not complete in under 15 minutes.
>
> > > > If I however, remove the o2m relationship in the invoice object and
> > > > add the fk_invoiceId as a property to invoiceItem, it takes only a
> > > > couple minutes.
>
> > > --
> > > E: [email protected]
> > > T:http://www.twitter.com/neurotic
> > > W:www.compoundtheory.com
>
> --
> E: [email protected]
> T:http://www.twitter.com/neurotic
> W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to