Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » Performance problem (Performance problem)
Performance problem [message #1962] Thu, 26 February 2009 23:46 Go to next message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

Mr. Marston, congratulations for your great job.
I have a performance problem with an ADD4 transaction, the performance generating records is about 5 records per second wich is very slow.
The loop that generates the $rows array has no database access and no complex calculations. Is there some way to improve the performance?? I'm generating batchs of 6000 records.
You can find the class file attached.
Thanks for advice.
Re: Performance problem [message #1963 is a reply to message #1962] Fri, 27 February 2009 05:40 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2368
Registered: April 2006
Location: Surrey, UK
Senior Member
If the loop which is causing the problem is not executing any framework code then the framework code is not the problem.

Have you run your script through a profiler to see where the delays are?


Re: Performance problem [message #1965 is a reply to message #1963] Fri, 27 February 2009 11:32 Go to previous messageGo to next message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

The loop run fast, I'm affraid that the delay is associated with the insertMultiple function. I understand that _cm_getInitialDataMultiple (where the loop is) is executed before insertMultiple wich physically writes the records.
I can see the table growing up with the records inserted, and it's very slow.
Re: Performance problem [message #1966 is a reply to message #1965] Fri, 27 February 2009 11:57 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2368
Registered: April 2006
Location: Surrey, UK
Senior Member
Is the delay inside _cm_getInitialDataMultiple() where it is assembling the data, or in insertMultiple() where it adds the data to the database?

How much validation or pre/post processing is being done as each record is inserted?

How many indexes does the table being inserted to have?


Re: Performance problem [message #1967 is a reply to message #1966] Fri, 27 February 2009 12:23 Go to previous messageGo to next message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

The delay is insertMultiple().
There is no validations or preprocessing.
There are only 2 database access for postprocessing .
The table has 4 foregein keys and it's primary key.
Re: Performance problem [message #1968 is a reply to message #1967] Fri, 27 February 2009 13:02 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2368
Registered: April 2006
Location: Surrey, UK
Senior Member
Do you have access to a profiler which can identify if the delay is in the framework code or the database? Without being able to identify where the problem is exactly, it would be impossible to identify an effective solution.

Re: Performance problem [message #1970 is a reply to message #1968] Thu, 05 March 2009 05:11 Go to previous message
AJM is currently offline  AJM
Messages: 2368
Registered: April 2006
Location: Surrey, UK
Senior Member
It is possible that all your database inserts are being slowed down because they are also being written to the AUDIT database. You can turn audit logging OFF for an individual task by placing the following code in the _cm_initialise() or _cm_getInitialDataMultiple() methods:
    $this->audit_logging = false;

This will affect the current task only, so will leave audit logging ON (if it is configured to be ON) for all other tasks.


Previous Topic: How can I achieve retrieving data from different tables and marking them as printed?
Next Topic: Bug???
Goto Forum:
  


Current Time: Sat Nov 23 07:10:18 EST 2024

Total time taken to generate the page: 0.01196 seconds