This one time, at band camp, Enrique Rodr�guez said: ER>my config is win2k, castor 0.9.4.1, oracle jdbc drivers, without app server, ER>(it will go on Sun One 7, but now i'm devoloping on my pc, with ER>netbeans3.4.1), ER> ER>I receibe an xml file with near 3500-6000 products. this products have some ER>caracteristics (near 200) and are stored in different tables (near 40), read ER>XML file go very fast, when i read all, i store they in the database. ER> ER>All the products belong to a shop Object, so I only db.create(shop). From ER>this time to the first insert, castor take 3 minutes. to insert near 40000 ER>records on the database takes another 3 minutes.
Depending on the amount of memory available and/or being allocated to the JVM, this type of performance is not uncharacterstic with this many objects. First Castor is unmarshalling the mapping, making object associations, generating all possible SQL statements, etc. I hazard a guess that the unmarshalling alone will take a fair amount of time - that's a LOT of work. This is certainly going to take a while with the sheer number of objects with which you are working. Remember that that Castor is handling a lot of work for you automatically. Mickael's suggestion is a good one. There's no doubt that straight SQL will be faster, but I'm curious to see how much. My guess is that the speed gain may not be enough to warrant doing everything Castor handles by hand. ER>I don't now why castor take the first 3 minutes, and this is my problem. This is due to the sheer number of objects you have. It also gets back to all the work that Castor is handling for you automatically. Much of this work is handled via reflection which, in and of itself, requires a fair of overhead. ER>-----Mensaje original----- ER>De: Bruce Snyder [mailto:[EMAIL PROTECTED]] ER>Enviado el: mi�rcoles, 27 de noviembre de 2002 16:35 ER>Para: [EMAIL PROTECTED] ER>Asunto: Re: [castor-dev] Disable transaction ER> ER> ER>This one time, at band camp, Enrique Rodr�guez said: ER> ER>ER>Thank youu Rainer, I don't know if my solution will be disable ER>transaction, ER>ER>but but castor is very slow for me. I am investigating the castor ER>behaviour, ER>ER>becouse it take a lot of time from db.create(myObject) to the first ER>insert ER>ER>on the database. ER> ER>If that's the problem, it sounds like some troubleshooting and tuning ER>of your app is in order. Trying to disable transactions in Castor is a ER>complete sledgehammer approach. Let's get some info about your environment ER>and your app so that we can narrow down the slowness in your app. ER> ER>What operating system, Castor version, database and JDBC drivers are you ER>using? Are you using an app server? If so, which one? What *exactly* is ER>slow in your code (post the relevant section(s))? How slow is it? What ER>types of troubleshooting have you performed so far and what have you ER>found? ER> ER>Bruce ER>-- ER>perl -e 'print ER>unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' ER> ER>----------------------------------------------------------- ER>If you wish to unsubscribe from this mailing, send mail to ER>[EMAIL PROTECTED] with a subject of: ER> unsubscribe castor-dev ER> ER> ER> -- perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
