473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

When is the php code loading to main memory?

Hi All,

I got some problems for php performance.
I have big php file which size is around 70K.
And When i request simple one it is too slow.
So i printed time stamp to find which part is slow.
And i finally found some facts.
When I printed time stamp in a function it takes less than 10 ms.
But When i printed time stamp out of fuction, starting above the
include statement which includes 70k php file, it takes more than 1000
ms.

I heard that php code is loading to main memory only one time except
when it's modified.
Only when php file modified it loades the php code to main memory
again.
Is it wrong concept?

only way i can do is to split the big php file to small pieces?
Are there any better solution?
Jul 17 '05 #1
1 1704
"Kim Gijung" <gi****@amicus.co.kr> wrote in message
news:64**************************@posting.google.c om...
Hi All,

I got some problems for php performance.
I have big php file which size is around 70K.
And When i request simple one it is too slow.
So i printed time stamp to find which part is slow.
And i finally found some facts.
When I printed time stamp in a function it takes less than 10 ms.
But When i printed time stamp out of fuction, starting above the
include statement which includes 70k php file, it takes more than 1000
ms.

I heard that php code is loading to main memory only one time except
when it's modified.
Only when php file modified it loades the php code to main memory
again.
Is it wrong concept?
The Zend engine trys to work more efficiently by caching parsed code.
only way i can do is to split the big php file to small pieces?
Are there any better solution?


You need to profile your code to see what code you regually use and what is
only occasionally used. Move the rarely used code into seperate files and
only include then when needed.

You also need to examine your programming to see if you are actually writing
in the most efficent style. 70k is a very big program, are you sure you'd
not be better off reducing some of the code into more generic
functions/objects?

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kim Gijung | last post by:
Hi All, I got some problems for php performance. I have big php file which size is around 70K. And When i request simple one it is too slow. So i printed time stamp to find which part is slow....
14
by: Jacob Lee | last post by:
There are a bunch of new tests up at shootout.alioth.debian.org for which Python does not yet have code. I've taken a crack at one of them, a task to print the reverse complement of a gene...
4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
6
by: Clunixchit | last post by:
I would appreciate if you can criticise my code as well as if possible give advice on how to improve it. #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/types.h>...
1
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
4
by: wqyuwss | last post by:
Hi, We have several core dumps in our product. These core dump can be reproduced in the same place. That is system function call std::basic_istream<char,std::char_traits<char>>::getline. The...
4
by: mrmagoo | last post by:
I'm building a vb.net Forms project that is getting data from a SQL Server database. One of the main goals of the project is to be really responsive to events, such as textbox change events. I...
17
by: Mike | last post by:
Hello, I have following existing code. And there is memory leak. Anyone know how to get ride of it? function foo has been used in thousands places, the signature is not allowed to change. ...
39
by: Leonardo Korndorfer | last post by:
Hi, I'm litle confused by the const modifier, particularly when use const char* or char*. Some dude over here said it should be const char when you dont modify it content inside the function, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.