Bug 155214 - Creating PHP Model is very long and happens to every relaunch of eclipse
Summary: Creating PHP Model is very long and happens to every relaunch of eclipse
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 major with 8 votes (vote)
Target Milestone: ---   Edit
Assignee: Guy Gurfinkel CLA
QA Contact: Yossi Luson CLA
URL:
Whiteboard:
Keywords: plan
: 163568 188913 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-25 08:40 EDT by Laurent C CLA
Modified: 2020-05-14 10:17 EDT (History)
15 users (show)

See Also:


Attachments
Log file when bug occured (43.10 KB, text/plain)
2007-10-22 07:31 EDT, Roman Shevtsov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent C CLA 2006-08-25 08:40:11 EDT
Hello,

In addition to the bugs #147428 and #152083 (The data model is invoked for every kind of project), there is another problem :

When I open php-ide, it creates php model everytime !
(even if a .dataModel file already exists)
That's not really a problem, but the thing is it's really long, and that's a 
problem !

It stops at 50%, then blocking totally eclipse (not responding) for a long 
time (2 minutes !)
The CPU is not used at all, so I really wondering what it does !

2 minutes after, it's ok, and I can begin to work...

If you know how to solve it, thanks...

(For information, I use PHP-IDE 0.2.2 whith a subversionned project with 
subversive 1.0.2 (the svn plugin from polarion). Maybe php-ide scans all the 
file, even the svn ones so it can take a lot of time cause there are many 
files for svn)

Apparently, the problem seems to appear if we use a versionning system like CVS or SVN.
Comment 1 Laurent C CLA 2006-08-25 09:58:41 EDT
More information :

If I start eclipse with a closed project (closed before the last exit), PHP-IDE starts normally, and if I open the project, it "builds the workspace" (what can it build in a PHP project ??), but this is a short operation (only a few seconds)

It's only when I open eclipse with an opened project in the workspace (which is a very common things) that the "creating php model" is very long and make eclipse not responding for a while.
Comment 2 Ryan Hayle CLA 2006-11-06 12:43:06 EST
I would increase the priority of this bug, it almost makes PHP IDE unusable with a very large project.  For me it takes a lot longer than 2 minutes (more like 15)!  Especially when accessing a project directory over the network.
Comment 3 Guy Gurfinkel CLA 2006-11-09 04:32:41 EST
Question to the last person responding:
which version/build do you use?
and also what OS?

thanks.
Guy
Comment 4 Guy Gurfinkel CLA 2006-11-09 04:43:24 EST
*** Bug 163568 has been marked as a duplicate of this bug. ***
Comment 5 Ryan Hayle CLA 2006-11-09 09:42:48 EST
This has been a consistant issue in each version I've used.  At the moment, I'm using Eclipse 3.2 (M20060629-1905) with PHP IDE 0.7.0.v20061026 on WinXP.

I've used both Eclipse-GTK and WinXP with the same results.  Accessing the project over a SMB share probably doesn't help things, either.  I have not had time to measure the performance if I copy the 150M project locally.
Comment 6 Guy Gurfinkel CLA 2006-11-19 07:38:02 EST
Each time you open the project the php ide must load the php model, either from 
reading and parsing the files or by loading it from the cache, The question is 
(and I can imagin that if your project is 150M you may notice the difference): 
does it looks like its reading and parsing all the files or it just takes time 
to load from the cache since its a large project.

Thanks,
Guy.
Comment 7 throwaway CLA 2006-11-27 17:37:18 EST
On mine, I get 
---------
Internal Error
An out of memory error has occurred... 
-------
An internal error occurred during 'Creating php model ...' 
<<Details
Java heap space
--------
I've tried the all-in-one package and downloading each plug-in separately. I can check out the project just fine - it's the model creation that runs out of memory. I've tried executing eclipse alone and with -Xms128m -Xmx512m parameters, and also specified the jre1.5 VM. I have ~780MB physical RAM and a 2.4GHz P4 processor.
Comment 8 throwaway CLA 2006-11-27 17:40:41 EST
Also, my project was initially checked out via CVS from a server, where it had been created by a different PHP IDE installation. - colin

(In reply to comment #7)
> On mine, I get 
> ---------
> Internal Error
> An out of memory error has occurred... 
> -------
> An internal error occurred during 'Creating php model ...' 
> <<Details
> Java heap space
> --------
> I've tried the all-in-one package and downloading each plug-in separately. I
> can check out the project just fine - it's the model creation that runs out of
> memory. I've tried executing eclipse alone and with -Xms128m -Xmx512m
> parameters, and also specified the jre1.5 VM. I have ~780MB physical RAM and a
> 2.4GHz P4 processor.

Comment 9 throwaway CLA 2006-12-11 14:53:27 EST
(In reply to comment #8)

I created a new module for those files on the server and that seemed to fix things.

> Also, my project was initially checked out via CVS from a server, where it had
> been created by a different PHP IDE installation. - colin
> (In reply to comment #7)
> > On mine, I get 
> > ---------
> > Internal Error
> > An out of memory error has occurred... 
> > -------
> > An internal error occurred during 'Creating php model ...' 
> > <<Details
> > Java heap space
> > --------
> > I've tried the all-in-one package and downloading each plug-in separately. I
> > can check out the project just fine - it's the model creation that runs out of
> > memory. I've tried executing eclipse alone and with -Xms128m -Xmx512m
> > parameters, and also specified the jre1.5 VM. I have ~780MB physical RAM and a
> > 2.4GHz P4 processor.

Comment 10 Christian Springub CLA 2007-01-28 06:28:49 EST
Hi,

I have the same problem too! I opened the project over network, maybe this is the "big" problem. Would be very nice if this could be fixed, my eclipse is not usable with this. Thanks,
Christian
Comment 11 Gadi Goldbarg CLA 2007-01-31 04:48:29 EST
*** Bug 163568 has been marked as a duplicate of this bug. ***
Comment 12 Guy Gurfinkel CLA 2007-02-10 14:15:16 EST
closing this bug, the problem described by the reporter and second person commented on this bug was fixed. running Eclipse with projects located over the network should be investigated separately, if this problem still occurs in RC2 please open a new bug.
Comment 13 Gadi Goldbarg CLA 2007-02-11 08:54:46 EST
agreed
Comment 14 Bugs CLA 2007-04-02 06:56:01 EDT
I've tested this with the nightly build org.eclipse.php_feature-N20070401.zip and this still takes a while before the php model is created.

This is not fixed!

John
Comment 15 Ralf Müller CLA 2007-04-05 01:29:44 EDT
(In reply to comment #14)
> This is not fixed!

That's my experience too!
Comment 16 Youri op 't Roodt CLA 2007-05-14 09:10:16 EDT
I'm having the same problem with PDT 0.7 S20070401-RC3. I have two very large (few hundred classes each) projects open, whenever I start Eclipse it starts to 'Create the php model' but never seems to end, it's stuck at 0%. I keep killing eclipse after 20 minutes because it is completely unusable.

The projects were checked out using subclipse and reside on my local disk.
Running Windows XP SP2, 2.5Gb physical RAM, AMD64 3200+.
Comment 17 Udo Rader CLA 2007-05-15 15:11:45 EDT
So here's another confirmation about this issue. Maybe the OP or Roy can reopen the bug?

This is indeed _very_ annoying because it hits you from the moment when you have installed PDT. You do not even have to have a PHP project in your workspace.

Depending on the mood of PDT it can take seconds to several minutes until eclipse is useable.

Due to the major effect this has on the entire eclipse installation, IMHO the severity of this should even be raised to "critical" if not even "block".
Comment 18 Roy Ganor CLA 2007-05-16 01:33:06 EDT
OK, it is worth a check, but again I need your support.

you say it is not a 100% reproducable, and in matter of fact we haven't encountered this problem for a long time.

can you tell me your computer configuration as well as the name of the framework you use?
thnax,
Roy
Comment 19 Udo Rader CLA 2007-05-16 04:26:09 EDT
OK, I can reproduce on the following installations:

eclipse 3.2.2 + PDT with all available updates

* running on an amd64 ubuntu 7.04 feisty:
% java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-b105, mixed mode)

* running on x86 mandriva 2007.1 spring:
% java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

* running on x86 mandriva 2007.0:
% java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

As per the randomness, I would just guess that the bug happens in 90% of the time when eclipse is started.

And as others have already found out as well, killing eclipse and restarting it  makes it start up normally "sometimes", but thats 50% at best ... Most of the time one just has to wait.
Comment 20 Udo Rader CLA 2007-05-22 07:36:41 EDT
anything more I can come up with?

I've tried to strace the processes involved, but at least at first glance nothing obvious goes on when waiting for the creation thing to end.
Comment 21 Phil Moorhouse CLA 2007-05-24 04:59:33 EDT
I also have this problem.

My project is also located on a smb share. This is a severe issue as it completely locks up eclipse, I have left it to do it's thing for 15 minutes or more and I have never had the patience to wait any longer to see if it recovers.

WORKAROUND:
If I disconnect the share before loading eclipse, then the project doesn't open and the "Creating PHP model..." doesn't start. I can then connect the share, open the project, refresh it, and continue working as normal.
Comment 22 JohnnyB CLA 2007-05-30 09:33:19 EDT
Same problem here. I'm on Windows 2000, Eclipse 3.2.1, PDT 20070401 and Subversive 1.1.2

The problem appears to be random, but when it hits it takes ages to finish the PHP Model thingy.
Comment 23 Gadi Goldbarg CLA 2007-05-31 06:24:30 EDT
Hi All,
The bug is not reproducable on the latest integration build.
Can anyone try to download the latest all-in-one and let us know if it still 
heppens?
http://download.eclipse.org/tools/pdt/downloads/?release=I20070520
Comment 24 Guy Gurfinkel CLA 2007-05-31 07:28:05 EDT
We had found a problem when integrating with Subversive, and supplied them a patch for it.

Udo, Phil - do you use it also ?
Comment 25 JohnnyB CLA 2007-05-31 07:42:15 EDT
(In reply to comment #24)

Hmm, thanks Guy. Thinking back I was using Subclipse, then a while ago I changed to Subversive, and I don't think I was getting the problem with Subclipse (but I can't quite remember). It certainly didn't happen immediately I changed - but that could be because of the 'randomness' of it? Or the fact I was jumping from project to project which might have disguised the fact that something broke when I changed Subversion clients...

As requested I'll try the latest integration with the latest Subversive as soon as I get a chance. Might be over the weekend.

Thanks for the help guys, much appreciated.
John.


> We had found a problem when integrating with Subversive, and supplied them a
> patch for it.
> 
> Udo, Phil - do you use it also ?
> 

Comment 26 Udo Rader CLA 2007-05-31 08:10:04 EDT
yes, I am using subversive, so I'll try the build today.
Comment 27 Phil Moorhouse CLA 2007-05-31 08:48:57 EDT
I have subclipse installed but I am not currently using it on the project, yet I still get the bug.

I haven't tried subversive.
Comment 28 Guy Gurfinkel CLA 2007-05-31 09:47:25 EDT
guys,
The problem we have found was in subversive, I don't think that using new PDT will help but a subversive with the patch we have submitted them should.

Sorry if I misled you.

We are planning on implementing another change that may help also in two three weeks.
Comment 29 Michael Spector CLA 2007-07-01 06:29:10 EDT
*** Bug 188913 has been marked as a duplicate of this bug. ***
Comment 30 Daniel Beckham CLA 2007-07-01 09:30:48 EDT
This problem is happening for me as described in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=155214

I use Subclipse on a local working copy, not subversive.  No network mount, no Subversive.  This is PDT problem, or at a least not a 3rd party problem outside of eclipse or eclipse plugins.
Comment 31 Udo Rader CLA 2007-07-05 08:47:33 EDT
I would like to add to the previous bug reports that this is _not_ resolved even in 3.3.

Is there anything we can provide you with so that this can finally be fixed in a near future?
Comment 32 Karthik CLA 2007-07-07 03:20:05 EDT
Eclipse: 3.3
Eclipse Build id: I20070625-1500
PDT: 1.0.0.20070611
Subclipse: 1.2.3
Subversive: 1.0.5

I can confirm that this is still occurring and is not restricted to the Subversive plug-in. I occasionally encounter this issue with Subclipse checkouts as well.

The Zend patch for subversive appears to have been committed ( http://polarion.org/index.php?project=subversive&page=patchInfo&id=2007-05-16-15-53-34-197 ). However, none of the changelogs mention it being incorporated in a release. There doesn't appear to be an official 3.3 compatible release for subversive either.

I have no issues with the CVS plug-in.

Thanks.
Comment 33 Karthik CLA 2007-07-07 04:53:19 EDT
I'd like to also add that in my case, the PHP model is never built. It just hangs indefinitely on "building php model" and "scanning for tasks" is queued after it. While I am able to cancel the "scanning for tasks" item, cancelling the "building php model" item does not succeed and I'm also unable to shut down Eclipse as a result. The only way to shut down Eclipse at this point is by killing it manually.

-K
Comment 34 Jacob Weber CLA 2007-07-07 13:45:13 EDT
This is also an important one for me. It's happening on both the Mac and Windows versions of Eclipse. I'm using version 3.3, with no special plugins except WST/JST and its dependencies, and PDT S20070611-M1.

On the Mac, the PHP projects are on the startup disk; the same disk as Eclipse. On Windows, the PHP projects are on another disk, accessed via a SMB share.

The very first time I launch Eclipse with these projects available, the "Building PHP Projects" takes a very long time. Every time I launch it afterwards, it takes several minutes, although it's not as long as the first time. So it does seem to be storing *some* data between launches; just not enough.
Comment 35 moshe CLA 2007-07-08 08:15:09 EDT
Hello,

I am try to solve this issue but I can't reproduce this bug.
I am work with PDT 1.0.0.20070611, Subclipse 1.2.3.
I created project (30M, 8,000 files) on SVN and the first build took less than  1 min.

someone can help me to create env which reproduce this bug.

Thanks.
Comment 36 Jacob Weber CLA 2007-07-08 12:49:10 EDT
My workspace has 10 projects, about 350 MB, and about 12,000 files. Most of the files have extensions that I've defined in Eclipse as PHP content types (e.g. .php, .class, .tmpl). Many of the projects have one of the other projects in their include path. They're all CVS proejects, and they all have the following build commands in their .project file:
   org.eclipse.wst.validation.validationbuilder
   org.eclipse.php.core.PhpIncrementalProjectBuilder

For each of the projects in the workspace, the "Building PHP Projects" task goes through three steps: "PHP Project Builder," "Validation," and "Compiling." The "Compiling" step takes the longest; the first two are pretty fast. Once it's done with that, it goes through some other tasks fairly quickly, including "DTD Validator" and "HTML Syntax Validator."

Maybe we can take a different approach. What is the expected behavior? Is it supposed to do the "building php projects" on startup at all, or does it try to cache all the build information? What conditions would cause it to re-build?

Also, Eclipse has a tendency to freeze up permanently, if I try to do anything while it's still building. I guess that should be a separate bug, if I can reproduce it.
Comment 37 Udo Rader CLA 2007-07-09 07:01:10 EDT
as per comment 35, please ASK precicely what you need to know.

Do you require logfiles?
If yes, which ones?

Do you require settings?
If yes, which ones?

Do you want us to run with java debugging enabled?
If yes, do you want logfiles?
If yes, which ones?

What do you need to be able to track down the problem?

At least I cannot anticipate what information you need to fix this bug.
Comment 38 Yossi Leon CLA 2007-07-30 11:02:02 EDT
1. SVN Problem was solved.
2. Problem loading PHP Projects was solved (of course there is always something to do about it). After checking with a huge project of 14K files, it took 1 minutes and 20 seconds to load the project for the second time (scanning the files without reading the content).

Btw, part of the validation is by HTML validator and there should be also improvement (a separate bug for WTP) and bug reported in WTP project.

Next time please open separate bug reports for separate problems (SVN, PHP, HTML validators).
Comment 39 Gadi Goldbarg CLA 2007-08-27 06:58:02 EDT
Need more testing before approving this bug
Comment 40 Gadi Goldbarg CLA 2007-09-02 16:12:40 EDT
After intense testing of small/medium/large projects with html included. It 
seems that the problem is fixed
Comment 41 Henning Vitting CLA 2007-09-17 10:19:31 EDT
Sorry I have this problem on pdt-all-in-one-incubation-S20070910_RC1-win32.zip

I have just installed above version of Eclipse Europa with PDT

When I open My My project ( I use a separate workspace for each project)
The Eclipse hangs with an unresponsive GUI for more than 2 minutes.
The lover righand corner says Building PHP Projects (0%). No colered progress bar!


On the same machine I have Eclipse 3.2 build ID M20060921-0945
PHP Feature 0..7.0 V2007401
There the same build for the same project, (the php files are exact copies of the problem project) takes less than 20 secs, and during that time the %counter counts and the small green progress bar are shown. At the whole time the GUI is responsive.

My repository is CVS, but it does not matter if the project is connected or not.

If I start with the project disabled, the IDE starts immediately, and when I enable the project I see the green progress bar flashing for a few seconds and the IDE is ready.

thanks
Henning
Comment 42 Roman Shevtsov CLA 2007-10-22 07:31:28 EDT
Created attachment 80869 [details]
Log file when bug occured
Comment 43 Roman Shevtsov CLA 2007-10-22 07:33:06 EDT
Same problem with my Eclipse 3.3.1 + PDT 1.0.1.20071001, project is not big - 25 php files of total 150kbytes size.

Please find my log attached.
Comment 44 Guy Gurfinkel CLA 2007-10-23 05:57:09 EDT
I have made some more improvements. should be better now
Comment 45 Roman Shevtsov CLA 2007-10-24 09:49:58 EDT
(In reply to comment #44)
> I have made some more improvements. should be better now
> 

I've tried the latest nightly build, but bug is still there. Startup is long and annoying :(
Comment 46 Guy Gurfinkel CLA 2007-10-24 12:38:09 EDT
because the change was not included in the last build. it will be in the next one.
Comment 47 Roman Shevtsov CLA 2007-10-26 12:19:22 EDT
(In reply to comment #46)
> because the change was not included in the last build. it will be in the next
> one.
> 

I'm using latest nightly 20071025 build, but startup is still very annoying. Or your patch will not be included in nightly builds?
Comment 48 Guy Gurfinkel CLA 2007-10-28 06:24:33 EDT
(In reply to comment #47)
> (In reply to comment #46)
> > because the change was not included in the last build. it will be in the next
> > one.
> > 
> I'm using latest nightly 20071025 build, but startup is still very annoying. Or
> your patch will not be included in nightly builds?

I just looked at your log again, your problem has nothing to do with this bug.
please create a new bug, attach the log and specify what other projects you have on your installation (like SVN maybe).