I'm programming in PHP (PDO).
I have done this in gedit, but now I'm using Eclipse.
The problem is that it is very slow. First I worked with a FTP connection and edited the PHP files directly in the FTP connection.
I have done some research and found these links:
SO question
— my problem is that the slowness is throughout the whole document.
Blog posting
— I have tried all the tips, but without good results.
I have tried to edit files on my hard drive, but that does not work for me either.
I'm working on ubuntu 12.04, with a Intel dual core 2.4GHz 4GB RAM.
My computer is about 3 years old.
I hope you can help me with this! It is very irritating.
You should try tuning the settings of the JVM in which you run eclipse, take a look at this post here on StackOverflow that list best settings for eclipse.
On Linux, I've noticed a good performance improvement setting the Theme to Classic (was GTK).
Window -> Preferences, General, Appearance, change Theme to Classic, click Apply, restart Eclipse.
Of course eclipse.ini JVM settings also help, but I've already done that before, and besides already mentioned by the other answer.
Related
I got a real problem with Komodo Edit v8.5.3: I use XAMPP XAMPP v1.8.3 [PHP: 5.5.6] to provide a local hosted server for Komodo.
[Edit -> Preferences -> Languages -> PHP] ; here I configured the PHP stuff like this:
**Default PHP Interpreter** C:\xampp\php\php.exe
**Path to alternate PHP configuration file** C:\xampp\php\php.ini
**PHP Directories** nothing
After restarting I tested this feature: But no autocomplet and calltips, syntax checking did sometimes work ...
If I wrote some code, it began to scan the php directory of XAMPP for completing, but this search got freezed everytime somewhere (in the PEAR directory).
I don't really understand what's wrong with Komodo and XAMPP. (I did also reinstall Komodo.)
Komodo is great, but withoutd this the most importent feature is impossible.
Komodo php autocomplete didn't work for me, too.
My situation might be different, but I'm sharing for the next Googler to visit.
I installed Komodo before php5. Whoops. Installing php wasn't good enough, I had to also delete the config files in ~/.komodo-edit (or whatever folder it created).
That still wasn't enough, I also had to delete the ___.komodoproject file I was working on as well.
Then I was awed by Komodo's awesomeness.
Komodo Edit 8.5.3 has a memory leak problem. To confirm this check your process list and you will see Komodo Edit main thread and Python child thread. Watch to see the memory footprint of the Python thread as the scan progresses.
If the memory is large (for me is was over 1GB), try upgrading to a later release.
At time of writing this, you can find version 8.5.4 here:
http://downloads.activestate.com/Komodo/nightly/komodoide/latest/
I'm building a website using the FuelPHP framework, which by default prints the execution time and memory usage at the bottom of the page. Now I just noticed that on my local machine, I have a pretty small memory footprint:
Page rendered in 0.0304s using 0.721mb of memory.
I deployed exactly this site (including a snapshot of the database) to my remote test server and suddenly memory usage increases by a factor of 10:
Page rendered in 0.0963s using 7.099mb of memory.
I cannot explain such a big difference from the details of execution alone, so I think the deviation must be in the environment.
Unfortunately I'm mainly a programmer, not really a server admin, so I don't really know where to start looking. So I'm going to ask a bit of a general question, which will hopefully give me some useful pointers: where should I start looking? The code is exactly the same and as far as I am aware both machines (local laptop and remote server) are fairly standard Apache installations with PHP5. Any answers suggesting specific Apache or PHP settings that might cause this, or specific lines to search for in the logs, are welcome.
I realise this is a pretty general question that might get me some downvotes, any constructive critisism is welcomed instead. Basically, I'm at a loss where to even start looking, at the moment.
Update: I decided to first exclude the framework as the culprit, so I ran the following one-line script on both machines:
Locally I get a value of about 115, while the remote server reports about 600.
Update 2: Just noticed I'm running PHP5.5 locally but server is only at 5.3. Maybe some bug that got fixed later - will upgrade that first.
Thanks for the suggestions guys, I fixed the problem.
As noted in the update to the original post, I realised I was running PHP5.5 locally but server was only at 5.3. After some ppa-magic with apt and some help from other questions on SO I managed to install Apache 2.4 with PHP 5.5.x. Now I actually see
Page rendered in 0.0261s using 0.582mb of memory.
locally and remotely
Page rendered in 2.3184s using 1.238mb of memory.
Assuming that a factor 2 is caused by the server being 64-bit and not my development machine, I can live with the remaining difference.
Use Xdebug to find out what functions are using all your memory.
Most likely it's a bug or design flaw in the framework.
It can be difficult or even impossible to get Xdebug working depending on your server. But sometimes it's pre-installed and simple.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Honestly, I am tired of searching and trying various php debuggers and IDEs from netbeans to jetbrains PHP storm, Eclipse indigo, WAMP, (old zend server community edition) etc!
I need a working set of IEDs and debuggers so I can start developing my work!( I by the way want to develop php scripts in Windows)
Problems:
php storm: weird IDE]
PHP Tools for Visual Studio: it says it is free, but you can try it for free for 30 days
PDT Eclipse: too old, no updates, broken links. Working with Zend itself is creepy
Netbeans 7.3, still not easy to work with. So many settings Xdebug not working
I need something like PHP development tools for Eclipse Juno, any suggestions?
What combinations of IDE(netbeans, phpstorm, Eclipse, Visual stodio) + (Zned server, XDebug) do you guys use? I am really tired of this product not being compatible with one another.
I would really give PhpStorm another try. True, it takes a bit of time to get used to, but it offers a lot of features that are hard to find in other IDEs
Regarding debugging and testing, read these walk-throughs on debugging:
http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
And unit testing:
http://confluence.jetbrains.com/display/PhpStorm/PHPUnit+Installation+via+Composer+in+PhpStorm
Simple Texteditor
Apart from a proper IDE, I always have a 'regular' text editor 'on the side', for example to have a quick 'scratch' file to write down some notes, or to make minor changes in a file without having to open your entire project.
There are many nice editors, Sublime Text, NotePad++ and UltraEdit are some examples.
Test and development environment
Although using WAMP/XAMP is convenient to set up, it is not the best environment to test your project. Most PHP websites will be hosted on a Linux/Using environment, which is quite different from a Windows environment in many ways, some are:
Linux/Unix file systems are Case Sensitive, whereas Windows is not
Linux/Unix uses a slash / as directory separator, Windows uses backslashes \
Some parts of PHP rely on functionality provided by the operating system. Therefore PHP will produce different results on Windows than on Linux/Unix
Linux/Unix uses a different permission system
If you develop and test your websites on WAMP you will encounter unwelcome surprises when you try to deploy the website on the actual hosting environment. Some problems may not even present themselves instantly, which will even be worse (customer calling in the middle of your Holiday telling you that the 'flush cache' admin-panel flushed not only the cache, but also all uploaded content)
So, in order to properly develop and test your website, your development environment should match the targeted hosting environment as close as possible
Inform with your hosting provider what their environment looks like; What Linux distribution are they using? (CentOS? Ubuntu?) What versions of PHP, Apache, MySQL?
Set up your test environment according to this. Either by setting up a development server and installing Linux on that, or running a Virtual Machine on your workstation, for example VMWare or Parallels Desktop (a virtual machine may save you some time, because many pre-installed, ready to use LAMP disk-images exist)
Client side testing
Preferably, make sure you have some computers or virtual machines with a clean install of your targeted audience (Windows XP, Vista? etc) sometimes a clean install is missing plugins/functionality that you assumed are present, causing problems (no Adobe Reader installed? No Flash? Old version of Windows Media Player?)
If your targeted audience are business users, be sure to test your website in the actual environment. Think of pitfalls like Caching Proxy Servers, Firewalls, multiple IP-addresses, disabled JavaScript and Thin Clients (using Remote Desktop). Sometimes those environments are still using Internet Explorer 7 (even 6) because of company policy.
Dreamweaver is by far the best php writting tool, the color code is amazing and the auto complete features are irreplaceable. The only other program i have seen come close in the field of auto complete is zend and that lagged like no other. plus it has built in ftp AND it makes it pretty easy to move on to javascript (IMO)
As far as server software i personally favorite WAMP, but everyone will have their own preference
you can find dreamweaver(trial) here
Wampp is here (pretty sweet webpage):
For PHP, I'd use Notepad++ all the way due to dynamic typing instead of static.
Notepad++ is quite light-weight and won't be in your way.
What sort of debugging do you need? Heavy unit testing and profiling or just print_r type of debugging? Have you tried http://www.firephp.org/ ? It's an extension to Firebug that works really well with AJAX.
There is no Eclipse juno PDT . The latest one is for indigo and that one crashes from time to time.
I use Dreamweaver and Xampp, and occasionally Notepad+++ and Xampp.
As stated in the thread, Dreamweaver has a great color code system and is very user friendly. I suggest it.
xampp
Notepad
I suggest use of Nusphere php ide , its too great for php, it has auto complete features and in built server and you can debug run time, you can also set browser foo debugging your code , its true php debugger, i am using this debugger since last 3years ,its amazing and it has inbuilt ftp feature so you can also debug your ftp file.
Here is link Nusphere
I am using Eclipse PDT Helios with Aptana Studio on Windows XP SP3.
Very often, my workflow is interrupted because Eclipse starts a DLTK indexing process that lasts 30 seconds, sometimes up to 2 minutes - which is annoying.
I wonder if there is any way to:
Either turn that off or
Run the DLTK indexing process less frequently.
I didn't find any possibility to change regarding parameters in Window > Preferences.
PDT 2.2 (the one in Helios) is using a local database engine, H2, to store information. I wrote a post highlighting how to improve the performance of the new indexer.
There might be another way, but it's requires hacking and I haven't tried it myself since the early builds of PDT 2.2 so YMMV: use a newer version of H2. You see, PDT 2.2 uses H2 version 1.1.117. The current version is 1.2.140. Basically, it involves downloading a newer version from the h2 site, and replacing the current H2 JAR in the plugins folder with this Jar. I should really write a blog post about it. I just need to find some time...
I also have/had this problem and turned off "Build Automatically" in the projects menu.
Which seems to have resolved the problem for me...
So question is, and please excuse my ignorance here... but what is "Build" required for in PHP world.
There are some issue currently being worked out with the dltk.core.index process:
See bug 319130 from yesterday (August 4th).
Does anybody know of a fast PHP mode for eclipse? I have tried the Aptana PHP mode, and PDT, but neither can place a character in under a second, which is no way to write code.
Its probably due to my editing on a network drive, but it seems silly that an editor would depend so heavily on the hard drive.
Try to disable Code Folding under Window > Preferences > PHP > Editor > Code Folding. If file is larger than 200 lines of code, this feature cause Eclipse to run really slow!
They said that this bug is fixed back in 2008. but I still have this problem :)
I give my vote to Netbeans-PHP. But my prediction is it will be the same as Eclipse because these IDEs need to read PHP source files from HDD to create autocompletion database. And since your files are in network drive it will sure slow. Maybe you should consider using some version control software which can pull a source copy from network. So it will not slow down the IDE much.
Is Eclipse running from the network drive or is the file you are editing on the network drive. I run Eclipse with PHPEclipse all the time and the files I edit are on a network drive which mounts a Samba share on a Linux virtual machine and I have no problems. Eclipse depends on Java and it also takes a lot of memory. You may want to check that Java is working properly and that you aren't running out of memory. Or do an experiment and edit a file that is not on a network drive and see if it is any faster.
I've heard netbeans has great PHP support.
I use eclipse/PDT every day and it works fine. I guess I don't know what 'place a character in under a second' means cause I don't see any sort of delay entering code at all...