Welcome Guest, Not a member yet? Register   Sign In
CI compile cache?
#1

[eluser]vps4[/eluser]
CI include many files
it's not good for system I/O
is there any way to make CI compile cache?
so CI can just include nothing, because compile cache just 1 file.
#2

[eluser]slowgary[/eluser]
An entire CI installation is only about a megabyte. Do you really think there is that much overhead? I worked for a company whose CMS was almost 15 megabytes and several thousand files per installation and they were still putting nearly 100 sites on each server.
#3

[eluser]vps4[/eluser]
If you have a stock related site, it have no cache.
because stocks quotes change per second.
and every user make 1 request per second.(with ajax load stocks new quotes, etc.)
and you have 1000 online users.

so..... CI will take much overhead.

it's different with CMS. CMS can generate cache for users, when use cache, CI did not include so much files.
#4

[eluser]TheFuzzy0ne[/eluser]
It's a fine balance. You could probably put all the code into a single file, but that would be more memory intensive, especially since you'll be loading stuff you don't need to load on each request. For best results, you need opcode caching. For me, on my crumby server, CodeIgniter loads in less than 0.03 seconds - that's certainly no cause for me to worry.
#5

[eluser]xwero[/eluser]
Compile cache? vps4 are those just two words you stick together to get a reaction from the forum members.

If you cache a page on your server it is a single entity. From the cache class user guide page
Quote:Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed. When a page is loaded for the first time, the cache file will be written to your system/cache folder. On subsequent page loads the cache file will be retrieved and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.

So it doesn't matte how many files you include in a controller method if you have some kind of cache system.

You wrote you use an ajax request to load the changing data so you can show 'stale' data at first because it will be overwritten with fresh data as soon as the ajax request takes over the output.

vps4 it seems you are scared about performance but you don't understand how the things work. I advise you to first find out how something works before you start complaining.
#6

[eluser]Yorick Peterse[/eluser]
[quote author="xwero" date="1244906907"]Compile cache? vps4 are those just two words you stick together to get a reaction from the forum members.

If you cache a page on your server it is a single entity. From the cache class user guide page
Quote:Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed. When a page is loaded for the first time, the cache file will be written to your system/cache folder. On subsequent page loads the cache file will be retrieved and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.

So it doesn't matte how many files you include in a controller method if you have some kind of cache system.

You wrote you use an ajax request to load the changing data so you can show 'stale' data at first because it will be overwritten with fresh data as soon as the ajax request takes over the output.

vps4 it seems you are scared about performance but you don't understand how the things work. I advise you to first find out how something works before you start complaining.[/quote]

I was thinking exactly the same. Besides, I don't think changing the cache system will increase the I/O performance, or any performance at all. Sure you'll be able to optimize it, but making it a billion times faster ?
#7

[eluser]vps4[/eluser]
sorry for my poor english.
i was mean: for example

the controller /home/user
include('a.php');
include('b.php');
include('c.php');
...

the controller /stocks/
include('a.php');
include('c.php');

i am looking a way to generate like these file automatic:

/compile_cache/home_user.php (just 1 file included a.php, b.php, c.php)
/compile_cache/stocks.php (just 1 file included a.php, c.php)

when user viste controller /home/user will run /compile_cache/home_user.php
when user viste controller /stocks will run /compile_cache/stocks.php

all generated php file has protogenesis php code
#8

[eluser]bretticus[/eluser]
It should be pointed out that this is what op cache extensions for PHP are meant to do (without you having to reinvent the wheel.)

http://en.wikipedia.org/wiki/PHP_accelerator

mencached

I think it should also be noted that besides some core files for loading other libraries, models, helpers, etc. the loader class only loads (includes) the files you need. Which in turn, makes this much lighter than including all your base classes and only using a smattering of each. CI is actually very fast because of this. Even the creator of PHP gave cudos to CI. Just make sure your controllers are on light side because, as you call them from the URL, they are the only files included (along with the files your controller loads.)




Theme © iAndrew 2016 - Forum software by © MyBB