Jump to content


Photo
- - - - -

Slow load and no style, with or without less/dynamic_url

css style slow dynamic less

  • Please log in to reply
7 replies to this topic

#1 cfravel

cfravel

    Newbie

  • Members

  • 1 posts
  • Country: Country Flag

Posted 13 January 2013 - 10:08 PM

Using a localhost, latest build of XAMPP and latest WP:

 

1. Install WP, update to latest

2. Drop in PL Framework

3. Navigate to localhost/plframework

 

No other plugins, barebones installation, 10-15 second response time, appears to be missing CSS styling.

 

I have tried adding the following to wp-config.php, both one at a time and together, per other topics I found in the forum.

 

define( 'PL_NO_DYNAMIC_URL', true );
define( 'LESS_FILE_MODE', true );

 

The 2012 theme loads in <1 second and the CSS appears fine, so it is not a general server setup issue.

 

I believe the CSS generation is performing very slowly, because every so often (about 1 in 5 times), the styling will work.  It seems to be a race condition, where if the CSS finishes processing in time and is available, everything is happy.  But if the style generation takes too long, Apache serves the page without CSS.

 

Is there a way to force the CSS to be pre-rendered and served as a static file?  I do not need dynamic CSS generation and it's a waste of resources to generate this every page load.  It's especially painful on a development machine where it takes 15 seconds to check every code change.

 

Please advise how I can get the speed to be comparable to other WP themes and how I can ensure styling completes in a timely manner.

 

Thanks.

Attached Files



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 14 January 2013 - 10:21 PM

Hi there, I'd say check what your PHP memory allocation is on the local install, it needs to be over 128mb, 256Mb if possible. As of the last two upgrades a static css file has been set to be served as default.



#3 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 10:47 PM

By default the css is written to a file, as long as you own the folder and the framework is able to write to it.

 

define( 'LESS_FILE_MODE', true ); is on by default now you dont have to add this.

 

define( 'PL_NO_DYNAMIC_URL', true ); is only needed if permalinks are broken or not setup.

 

If you can enable the debug mode under advanced settings we may be able to help more, but fixing your localhost isnt easy as there are so many Platforms, xampp xamp mamp etc etc.



#4 joan54

joan54

    Advanced Member

  • Members
  • 59 posts

Posted 01 February 2013 - 02:06 PM

So...what is the solution then...for us who are not developers?...I have exactly the same problem. Please, indicate what to change and in which file...Thank you



#5 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 01 February 2013 - 02:53 PM

The file is wp-config.php

Which bit of the same problem are you having?

#6 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 01 February 2013 - 02:55 PM

Hi Joan54 

 

Please could you create a new topic detailing what problems you are having including links to your site etc so we can work on a solution for your particular setup? 

 

Thank you 



#7 joan54

joan54

    Advanced Member

  • Members
  • 59 posts

Posted 01 February 2013 - 03:31 PM

Hi, thank you for the answers.

 

Simon,

 

my problem was exactly the one presented in the beginning of this post. Even the thumbnail member "cfravel" attached was the one I had. i am using XAMPP

 

I found another conversation here  

Please Login or Register to see this Hidden Content

and that solve my problem.

 

I added  

 

define( 'PL_NO_DYNAMIC_URL', true ); 

 

and   define('WP_MEMORY_LIMIT', '256M');    (before was      define('WP_MEMORY_LIMIT', '120M');  )

 

in my wp-config.php

 

Also i changed the value on my   php.ini     

 

memory_limit = 256M          it was set :   memory_limit = 128M

 

 

But the      define( 'PL_NO_DYNAMIC_URL', true );     was my last change and I guess that did the magic. Now it seems it is fixed and moving forward to my customization.

 

Luis



#8 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 02 February 2013 - 01:17 AM

Hi Luis,

 

If you've not already done so, please open a new topic. Thanks.