cpu usage through the roof, suggestions welcome

A place for users and developers of the Xataface to discuss and receive support.

Postby generatedname » Wed Apr 25, 2007 10:22 am

As the database grows, and the "Show All" feature is used, the web site is taking longer and longer to load. At this point, I have over 1000, and when I do show all on my live server (hosted outside of my network) the browser just locks up (firefox).

When I do show all on the development server (on my network), it loads fine, but takes a while to transfer the data.

Are there any modifications that I can make that will allow the html to render in sections instead of altogether? Or perhaps make a pause in the loop that creates the table?

Thanks in advance!
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Apr 25, 2007 11:49 am

When you say you are showing all, does that mean that you are showing 1000 records on one page - or still just the regular 30 records per page.


Showing that many records (1000) is quite hard on PHP because it is rendering each cell, checking permissions, etc...

If you are running into performance walls, dataface has optional output caching that will improve performance some.Ê Just add the following to your conf.ini file:

[_output_cache]
enabled=1

This will create a table in your database that stores cached versions of the pages that you request. The cache will be refreshed whenever the database is changed.Ê You can also delete/empty this table to clear the cache manually.

Best regards


Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Apr 25, 2007 11:57 am

You may also want to look in your php.ini file to see about increasing the memory alotted to PHP.

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Apr 25, 2007 11:58 am

Another thing to increase would be your maximum timeout setting for php, in case it is running out of time while rendering the page.

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby generatedname » Wed Apr 25, 2007 1:07 pm

Thanks for all the help, just getting back from lunch and I'm going to try these.
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby generatedname » Fri Apr 27, 2007 9:05 am

Are there any tips you may have that could improve performance on the client side when rendering the html?

Just enough to prevent any lockups, and ensure that the website eventually loads.

And to answer your question, I did have to change the records per page to show all results on one page, so that it would print out everyone in one click, as that was one of the requirements and I could not find any way to have a print feature that would simulate clicking through all the "Next Page" and printing the records.
generatedname
 
Posts: 53
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sat Apr 28, 2007 3:42 pm

Things you can try:

1. Disable javascript.

2. Turn off style sheets.

3. Make a custom list view template that is plain jane.

4. Export the records to CSV by clicking the button in the upper right.Ê Then print in Excel

5. Make a custom action that creates a file for download in some nice format - then print from that format.

I'm sure there are other solutions, but this should give you something to chew on.


-Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 43 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved