473,408 Members | 2,832 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,408 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 1706
"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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.