NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Does version 4 have a memory leak?


Joined: 02 Sep 2005
Posts: 5
Location: Colorado
Reply with quote
I've been using version for since it's release and I absolutely love it. The Visual Studio .NET type interface and child windows that are sticky with the push-pin are awesom. I don't know how I managed to get any code written before.

However, I'm experiencing what seems like really high memory usage. It's been as high as 150,000K at times and the CPU usage is 97 to 99. Suffice it to say when this happens my whole system slows to a crawl and I have no choice but to kill phpEd using task manager. And I loose what I've been working on if it wasn't saved.

The other issue I have is that it occasionally crashes when it's trying to do code completion, and at one point I had quote completion turned on and it was crashing regularly, so I turned that off.

Has anyone else had these issues or similar ones? Or is it just me?
View user's profileFind all posts by mhonakerSend private message
Build is 4033


Joined: 02 Sep 2005
Posts: 5
Location: Colorado
Reply with quote
Build is 4033
View user's profileFind all posts by mhonakerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
had quote completion turned on

what do you mean? What's quote completion?

Quote:
It's been as high as 150,000K at times

We pay much attention to the memory leaks. Time after time we run memory debugger to make sure there is no new memory leaks and it constantly shows about 15-20K leaked and all these memory allocations are by 3rd party code and during the work these leaks do not grow up. So as far I know we're okay.
On the other hand, such 150M memory usage may happen without any leaks.
It depends on number of files in all the projects in the workspace.
To make a rough estimation on memory usage by each project, find <projectname>.ppx file and double its site.
Plus all *.cfg files should be doubled too, and finally the IDE itself takes ~ 35-50MB.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Quote Completion


Joined: 02 Sep 2005
Posts: 5
Location: Colorado
Reply with quote
Quote:
what do you mean? What's quote completion?


Tools->Settings->Editor Settings->Auto Close Quotes

Quote:
It depends on number of files in all the projects in the workspace.


It is a fairly large project, so that may explain the 150K memory usage, but what about the 97-99 CPU usage? Is it normal for phpEd to peg your processor like that?
View user's profileFind all posts by mhonakerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
what about the 97-99 CPU usage

It depends on the project size. In case of "fairly large" one, it may peg CPU up to 100% for short period of time (up to 5-6 seconds but not often). Longer time would mean there is problem with the IDE or with the machine performance.
Anyway, most of CPU-load related problems will be solved in the forthcoming v4 update #1.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Gracias


Joined: 02 Sep 2005
Posts: 5
Location: Colorado
Reply with quote
Good to know about the upcoming update addressing CPU-load issues, thanks for the update ddmitrie! Don't think it'll stop me from using phpEd 4 religiously. Evil or Very Mad Twisted Evil Cool Very Happy
View user's profileFind all posts by mhonakerSend private message


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
I have ver 3.3 at work (waiting for 4.1) and 4.0 build 4037 at home. Both PCs are identical. I've been editing a really large php file (> 16000 lines) and had some interesting experiences.

On 3.3 with this file and 4 others (< 1000 lines each) loaded, after an hour of editing it started reporting "Out of memory" and then wouldn't allow anything further, not even copy to clipboard. What was really bad though was that trying to save the file, it deleted the one on disk (it was there but nothing in it) and then reported "Out of memory", so for several very anxious minutes I didn't have my 16000 line file anymore! Then I started closing the other files, and eventually it did a successful save to disk. What really worried me though was that if I didn't have the other files to close I would have lost that 16000 line file. This is a potentially catastrophic bug. Hopefully it doesn't occur in 4.0.

Back home I tried the same thing on 4.0 and it works much better - no "Out of memory" messages. But I monitored the memory usage on my 1GB RAM PC using Win2000, and after about 4 hrs of editing PhpED was using about 900 MB of RAM, with total memory usage for PhpED of just under 1.2 GB (obviously some cached to disk). Total memory utilisation was at 100%, and my 3 GHz PC was crawling by this stage. Considering PhpED started at about 65 MB of RAM (total 124MB) with all 5 files loaded, this is a really big jump in memory usage.

This excercise did convince me though to upgrade my work version to 4.0

BTW I find 4.0 far more responsive than 3.3 when editing large files. In 3.3 a cut or paste of 2000 lines of code in a 16000 line file can take almost a minute to respond, with 100% CPU utilistation. In 4.0 doing the same thing, response is generally under 10 seconds. This can be greatly reduced by closing and restarting PhpED every half hour or so, depending on how much editing has been done, esp. when moving/deleting/copying big blocks of code.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I'd love to have somebody here nearby me editing such big files for 4h or so... Just to make sure it's not only possible but also the IDE works the way it's intended to work.
We run some good tests over 4035 and found some memory leaks (mostly OLE strings). It's been fixed in 4037 which has no known repeatable leaks or leaks that raise memory usage. With a general-purpose monitors like Task Manager available in XP, it's really hard to notice what actions cause leaks. It's granularity is 1K and often memory usage goes up and down too frequently. Do you have any precise memory monitor that would allow you to idenitify an action that causes the leaks? Such info would be greatly appreciated and if found would be fixed pretty fast.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
I'm using TaskInfo.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
ok. How about finding an editing (and possibly not only) action that causes the leaks?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 29 Sep 2004
Posts: 62
Location: �' AND sleep(21); /*
Reply with quote
I wasn't monitoring it that frequently. Maybe I can check at home when I've got more time.
View user's profileFind all posts by pointySend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
thanks.

BTW, there is a sceenshot of memory profiler session results. Many editing actions were run (block moving, pasting, typing, deleting etc):
http://forum.nusphere.com/sshot/phped_qa_memleak.jpg
Only 6 leaks were found.
3 caused by library we use (expected) and 3 are caused by manual -related stuff. Neither are repeatable (in other words they happen during startup only).
3 resouces leaks - it's 3 static critical sesions are not freed. These leaks are also non-repeatable.

BTW, as you may notice, in the half of work memory usage was down for a little. It corresponds to the time when another project was activated.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Does version 4 have a memory leak?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic