Welcome Guest, Not a member yet? Register   Sign In
Performance: Loading many (smaller) views Vs fewer (larger) views
#2

[eluser]slowgary[/eluser]
I'm sorry to see that no one responded to this reasonable question. I haven't done any benchmarking, but I can assure you that there is additional overhead for each view loaded. It could be very small, but at some point the view() function has to include() or require() the file in question, and loading files from disk does take time.

Additionally, view() in itself constitutes a function call, and I'm sure there's some logic involved in that call. Again, the amount of additional overhead could be very small, but I'm sure there's less overhead loading less views.

You could always throw a $this->load->view() call into a loop and do some testing. I usually break my views up into something like a header, body and footer.


Messages In This Thread
Performance: Loading many (smaller) views Vs fewer (larger) views - by El Forum - 09-06-2010, 01:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB