Part of the EllisLab Network
   
 
Is it just me ??
Posted: 01 June 2009 03:08 PM   [ Ignore ]  
Summer Student
Total Posts:  14
Joined  05-30-2009

Hi new to the CI but since using it I have noticed my images are taking longer to load. Its the same design used before ci and it was there when the page load. I may need to look into cashing but would there be a place that could walk me through it? ps i am uni student learing php…

ps it is just css images that area taking the longest

Profile
 
 
Posted: 01 June 2009 03:10 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1089
Joined  05-17-2008

Do you use a .htaccess file? Do any superfluous redirects happen?
Use Firebug to monitor the HTTP requests.

Profile
 
 
Posted: 01 June 2009 03:53 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  5
Joined  08-08-2008

Sounds like some configuration or unintended error.

Profile
 
 
Posted: 01 June 2009 07:24 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  14
Joined  05-30-2009

i do use htaccess to route everything through the index.php here is the controller i use for a typical page

function index()
  {
    $this->load->helper(‘url’);
    $data[‘title’] = “Header”;
    $data[‘copy’] = “Copyright”;
    $data[‘base’] = “”.base_url().”“;
    $data[‘menu’] = “MENU”;
    $this->load->view(‘constant/header’, $data);
    $this->load->view(‘constant/b4menu’);
    $this->load->view(‘constant/menu’, $data);
    $this->load->view(‘constant/btwn’);
    $this->load->view(‘tools’); // PAGE CONTENT
    $this->load->view(‘constant/aftcon’);   
    $this->load->view(‘constant/footer’);
  }

Profile
 
 
Posted: 01 June 2009 09:58 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  749
Joined  12-26-2006
ctc_media - 01 June 2009 07:08 PM

Hi new to the CI but since using it I have noticed my images are taking longer to load. Its the same design used before ci and it was there when the page load. I may need to look into cashing but would there be a place that could walk me through it? ps i am uni student learing php…

ps it is just css images that area taking the longest

 
Hi,

Couple of things that I would be tempted to do:
 
1. Get rid of all your Html and css errors.
 
2. Move all Javascript files from your header to immediately above </body>
 
3. Create a page without loading any graphics and have default colours.
 
4. Remove Twitter Javascript stuff that feetches all your latest data.
 
5. Just have a link to Twitter.
 
6. Reduce the size of “edlogo00.png” by making it into a jpg
 
7. Check out YSLOW for numerous other tips.
 
8. Checkout http://imageresizepro.com/downloads/ci_ctc_media/
 
9.  Invest in a faster server - email me smile
 
 
Cheers,
 
John
 
 
 

 Signature 

Joke of the day - Bulletin Board Ideas     (ongoing development site)

My Hippy Trail    Source code   

Latest Project

Profile
 
 
Posted: 02 June 2009 07:26 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  14
Joined  05-30-2009

its not my site i am having problems with

Profile
 
 
Posted: 02 June 2009 09:38 AM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  672
Joined  07-16-2008

Hey,

What do you have $config[‘log_threshold’] set to?
I had this set to 4(All Messages) and page was rendered in 3 seconds. I turned it to 1 (only error messages) and it reduced to 0.2 secs wink

One thing to look also is how you load your assets(images, javascript etc.). Do you load them with full url or relative to your server? If answer is full url, then they create a different http request for every object you load thus slowing down the site a little bit.

Profile
 
 
Posted: 02 June 2009 10:25 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  14
Joined  05-30-2009

the log threshold worked thanx for that smile

the load is faster than without CI strange!!

Profile
 
 
Posted: 02 June 2009 10:29 AM   [ Ignore ]   [ # 8 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2674
Joined  05-18-2008

I’ve never knows the jumpt to be that big, for me it was going from 0.5 (with logs set to 4) down to 0.3 (with just error logging)

 Signature 

I’m building a Project Management System for my 3rd year Uni project, Sign up to the beta
Track my progress | Post of the day: UI Designs
Get full auto complete support for CodeIgniter in Eclipse

Profile
 
 
Posted: 02 June 2009 10:31 AM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  14
Joined  05-30-2009

i cleared my browsing history etc incase it was that and it is a huge difference

Profile
 
 
Posted: 02 June 2009 11:05 AM   [ Ignore ]   [ # 10 ]  
Summer Student
Total Posts:  1
Joined  06-02-2009

I’ve used firebug before - it’s a great plugin - especially when you’re looking for the xpath of a document - it really saves a lot of time.

Thanks for the post on htaccess - i’ve got a similar situation where i’ve routed a lot of stuff through my htaccess file in an attempt at a revival of basic seo for my database driven site!

Profile
 
 
Posted: 02 June 2009 11:19 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
RankRankRank
Total Posts:  334
Joined  04-05-2007

Also you do not need to pass base_url() to your views. The views already have access to that function.

Profile