Part of the EllisLab Network
   
 
Is it just me ??
Posted: 01 June 2009 02: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 02:10 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1094
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 02: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 06: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 08:58 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  632
Joined  12-26-2006
ctc_media - 01 June 2009 02: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     (ongoing development site)

My Hippy Trail    Source code   

Latest Project

Profile
 
 
Posted: 02 June 2009 06: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 08:38 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  257
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 09: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 09:29 AM   [ Ignore ]   [ # 8 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2690
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 09: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 10: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 10:19 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
RankRankRank
Total Posts:  364
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
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120378 Total Logged-in Users: 27
Total Topics: 126497 Total Anonymous Users: 2
Total Replies: 665221 Total Guests: 293
Total Posts: 791718    
Members ( View Memberlist )