cformsII Support Forum
Current User: Guest *Frequently Asked Questions*
Search 
Search Forums:


 




Post

Josh Bauguss - Guest

9:23 pm - March 10, 2008

1

I've been working a bit on optimizing a server that uses wordpress.  It has led me to some pretty startling memory discoveries. 


I did a test on memory usage in wp.  try this on a testing wordpress site if you can with cforms enabled  ( i had 5 forms setup on the server i did this on )

index.php, echo memory_get_usage()  before wordpress includes start.

then in a cforms init hook, print it again.  then throw a die() so you can see the numbers on page request.

you will be quite startled at how much memory wp is eating up.

For me, i was using wpmu, 4 subblogs, 1 main blog.  5 forms.  pre-wp php reported 50kb of memory being used for the script.   during init hook, it reported 10mb being used! 


This brings me to my suggestion.  I then did a die(print_r($GLOBALS))  i noticed that one big glaring problem is that all the cform data is stored in wp_options.   While cforms is not the only plugin that stores data in wp_options, the data cforms is storing in it can really add up.  especially when a few forms are setup. 

I really recommend making cforms store its data in its own table.  It would greatly decrease how much memory is needed when cforms is installed.   Those options can then be accessed only when a cform is inserted in a page instead of every wp page call. 

I know I'll be much more careful in what I put in wp_options in my plugins now.

Oliver - Admin

6:37 pm - March 11, 2008

posts 3921

2

You're right on the 'adding up' part, it is in fact bugging me as well. It's on the to-do list but I can't say when it'll be changed as its a more significant mod and requires time that I currently don't have :-(

Thank you Josh for the constructive write-up!

Reply to Post


Reply to Topic: memory usage
PLEASE READ THE FAQs FIRST! THANK YOU.

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Topic Reply:

Save New PostSmileysOptions

Guest URL (required)

Math Required!
What is the sum of:
7 + 4
   

 
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell

Search