Skip to main content

Netbeans scanning issue resolved

I was having problems with Netbeans 6.9 where it would just hang trying to scan my codebase which consists of around ~200.000 PHP files. Another issue was related to code completion and suggestions which caused the IDE to become unresponsive or, in some cases, hang.

It looks like the issue is related to the heap size which is automatically set since version 6.0.

Since NetBeans version 6.0, the default limit for heap size (-J-Xmx) is determined automatically, with respect to the amount of memory available on the system. There is no -J-Xmx option specified in netbeans.conf. However, if you specify the heap size limit (i.e. you add the -J-Xmx... option to netbeans.conf), then the limit given by you will be respected.

http://wiki.netbeans.org/FaqSettingHeapSize

So I ended up increasing the heap size in netbeans.conf by adding the "-J-Xmx2048m" option. Here are my current settings:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-Xmx2048m -J-XX:PermSize=32m -J-XX:MaxPermSize=1024m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true" 

Although code completion is sometimes slow, my IDE never hangs and completes initial scanning within 2-3 hours.

Comments

Popular posts from this blog

Securing Symfony2 REST services with FOSOAuthServerBundle

Overview In my previous article, I wrote about setting up a Symfony2 REST service using FOSRestBundle. However, this REST service was behind a firewall protected by a generic form_login provider. Not really ideal if you wish to open your REST API to other applications. So in this article, I will try to explain how to set up FOSOAuthServerBundle to protect your REST API methods using OAuth2. Before we start getting into the gritty details, it is a good idea to have a look at the official OAuth2 documentation . Let's begin... FOSOAuthServerBundle Installation You have to install v1.1.0 of FOSOAuthServerBundle if you are using Symfony 2.0.x. If not, see the docs . First, add the following entries to your deps file: [FOSOAuthServerBundle] git=git://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git target=bundles/FOS/OAuthServerBundle version=origin/1.1.x [oauth2-php] git=git://github.com/FriendsOfSymfony/oauth2-php.git Run the vendors script to install these...

Setting up a Symfony2 REST service with FOSRestBundle

Installation First thing is to download and setup the FOSRestBundle. If you are running Symfony 2.0.x, get the FOSRestBundle version 0.6, otherwise, download the code in the master branch. The FOSRestBundle depends on the JMSSerializerBundle so the following instructions are going to include some extra information for setting up this bundle to complete our REST service. First thing is to install our dependencies. Add the following to your deps file: [metadata] git=http://github.com/schmittjoh/metadata.git version=1.1.0 [JMSSerializerBundle] git=git://github.com/schmittjoh/JMSSerializerBundle.git target=bundles/JMS/SerializerBundle [FOSRest] git=git://github.com/FriendsOfSymfony/FOSRest.git target=fos/FOS/Rest [FOSRestBundle] git=git://github.com/FriendsOfSymfony/FOSRestBundle.git target=bundles/FOS/RestBundle version=origin/0.6 Run the vendors script to install these bundles: php bin/vendors install Next, update your app/autoload.php file...

Home Monitoring with a Raspberry Pi 2 Model B and ZoneMinder

Overview I had been thinking about setting up a camera system in my place for a while. My plan was to set up two cameras with motion detection; one to monitor the patio for deliveries and another to monitor the living room in case there was a break in. This plan stayed in the back burner for a long time until my colleague's house got burglarized just a couple of weeks ago. He was in a different state at the time; however, as soon as he received an alarm, the police department was called and one of the intruders got caught right after he left the house. Suddenly, I had a good reason to implement my own system. My design requirements could be described as simplicity. I just needed two cameras with wireless connectivity to minimize cable clutter. The first camera would be monitoring my living room and needed to be PTZ capable. My idea was to disable monitoring while I was at home and I needed a camera with this capability to provide a visual indication. During t...