[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-05 Thread Bob Kerns
OK. I'm not 100% certain that the command line will take precedence
over the eclipse.ini. You might want to edit the -Xmx512m there.

Except that with a drive letter like L:, I'm surmising that you're
running it from a network share? This may cause some significant
performance problems, and is not something I would recommend. That
wouldn't cause you to run out of memory, though. But you might want to
experiment with a local copy.

Private working set is not relevant to running out of memory. working
set merely indicates, out of all the memory allocated in this
process, how much is actually in RAM? It is relevant to competing for
RAM with other processes, and thus paging slowdowns.

By Commit size is now 381.500 kB, you mean 381.5 MB? For this one
process? (Just checking). That is perhaps about right for a setting of
-Xmx512m, with the GC factored in, etc. It is not consistent with
running out of a  1GB allocation. (And I'm not sure the 32-bit
version of Java can actually handle a heap of that size; I don't
recall the limit, but I think you're not that far from it at best. I
do recall it changing from release to release and finding a server
stopped working as a result...) So one possibility is that the Eclipse
launcher may be dropping that setting without telling you, just
because it's too big.

One thing you can do, if you haven't already: In Eclipse, go to
Windows / Preferences... / General and check Show Heap Status. This
puts a field in the status bar that shows Java's idea of how much Java
heap it has allocated, and the current limit (i.e. the upper number
will grow from -XmsXXXm to -XmxYYYm). This is an easy way to see
Eclipse's GC status.

On Aug 4, 10:37 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:
 Eclipse is started using a shortcut:

 Galileo
 L:\eclipse-jee-galileo-win32\eclipse\eclipse.exe -vmargs -Xmx1324m

 Ganymede
 L:\eclipse\eclipse.exe -vmargs -Xmx1324m

 (I'm having the same problem in both)

 eclipse.ini says:

 --launcher.library
 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
 -startup
 plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
 -product
 org.eclipse.epp.package.jee.product
 --launcher.XXMaxPermSize
 256M
 -showsplash
 org.eclipse.platform
 --launcher.XXMaxPermSize
 256m
 -vmargs
 -Dosgi.requiredJavaVersion=1.5
 -Xms40m
 -Xmx512m

 The java version that is in path:

 java version 1.6.0_13
 Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
 Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

 I only checked the process in task manager, but I also made the
 columns for handles, threads and user objects visible. The number of
 threads was only about 40 which surprised me. (An fresh started
 Eclipse on my system has about 28 threads)

 Memory (Private working set) was about 400.000 kB. I did not check
 commit size, I tonigh when I got time to provoke Eclipse again. The
 paging size looked normal.

 I now saw that that Eclipse only used revision 5 of the Android SDK
 Tools. I started a fresh Eclipse, opened up Android SDK and AVD
 Manager, selected to install all available packages, and then bumbed
 into the same error again (so it took less than 2 minutes)

 Commit size is now 381.500 kB, Private working set 327.048 kB, Threads
 26, Handles 506

 On 5 Aug, 03:44, Bob Kerns r...@acm.org wrote:



  OK, this is good information. You are, in fact, running out of memory
  -- somehow.

  I've see this, but seldom as performance starts to suck for me long
  before.

  How exactly are you allocating memory for Java? How are you starting
  Eclipse?

  And when you were checking how much memory Eclipse was using, how did
  you check that, exactly? It sounds like you used the task manager --
  what is the exact title of the column you used? Task manager is not
  ideal for looking at this, but the only column that is actually
  relevant out of the 7 memory columns available is Memory - Commit
  size.  But the relationship between that and Java's GC'd heap memory
  allocation is tenuous. About the only thing you can say is that Memory
  - Commit size will be greater than the amount of memory Java is
  actively using in its heap.

  Did you check your paging file space? That's another way you can run
  out of memory.

  And finally, it may report this error when you've run out of native
  threads.  That is, in fact, WHERE you are running out of memory,
  though it may not be the specific cause. Check the Threads column.

  With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
  leak. In fact, my thread count was initially 47, went up to 52 briefly
  while auto-building my project, and then as I started looking at
  layouts, it has gone down to 37, and I don't seem to find anything
  with layouts that bumps it up at all.

  If you see a different behavior, then we have a clue. (Otherwise, it's
  still a clue, but a weak one).

  On Aug 4, 2:00 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:

   I just provoked my Eclipse 

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-05 Thread Kaj Bjurman
It is taking precedence. Setting it to e.g. 2000M (using a 32 bit VM)
stops Eclipse from starting stating the normal could not create Java
virtual machine.

No, L: is a local disk. :)

Yes, 381.500 kB is about 381 MB .

The 32 bit VM on my OS can create a VM with more than 1GB as Xmx, the
limit is close to what I use as an argument. Trying to set -Xmx to a
too large value will stop the VM from starting, at startup time, and
not later.

I talked to another developer who also is writing Android
applications .He has not had any problems on a 32 bit version of
Windows. (I'm using Windows Vista Ultimate 64 bit)



On 5 Aug, 09:09, Bob Kerns r...@acm.org wrote:
 OK. I'm not 100% certain that the command line will take precedence
 over the eclipse.ini. You might want to edit the -Xmx512m there.

 Except that with a drive letter like L:, I'm surmising that you're
 running it from a network share? This may cause some significant
 performance problems, and is not something I would recommend. That
 wouldn't cause you to run out of memory, though. But you might want to
 experiment with a local copy.

 Private working set is not relevant to running out of memory. working
 set merely indicates, out of all the memory allocated in this
 process, how much is actually in RAM? It is relevant to competing for
 RAM with other processes, and thus paging slowdowns.

 By Commit size is now 381.500 kB, you mean 381.5 MB? For this one
 process? (Just checking). That is perhaps about right for a setting of
 -Xmx512m, with the GC factored in, etc. It is not consistent with
 running out of a  1GB allocation. (And I'm not sure the 32-bit
 version of Java can actually handle a heap of that size; I don't
 recall the limit, but I think you're not that far from it at best. I
 do recall it changing from release to release and finding a server
 stopped working as a result...) So one possibility is that the Eclipse
 launcher may be dropping that setting without telling you, just
 because it's too big.

 One thing you can do, if you haven't already: In Eclipse, go to
 Windows / Preferences... / General and check Show Heap Status. This
 puts a field in the status bar that shows Java's idea of how much Java
 heap it has allocated, and the current limit (i.e. the upper number
 will grow from -XmsXXXm to -XmxYYYm). This is an easy way to see
 Eclipse's GC status.

 On Aug 4, 10:37 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:



  Eclipse is started using a shortcut:

  Galileo
  L:\eclipse-jee-galileo-win32\eclipse\eclipse.exe -vmargs -Xmx1324m

  Ganymede
  L:\eclipse\eclipse.exe -vmargs -Xmx1324m

  (I'm having the same problem in both)

  eclipse.ini says:

  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
  -startup
  plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
  -product
  org.eclipse.epp.package.jee.product
  --launcher.XXMaxPermSize
  256M
  -showsplash
  org.eclipse.platform
  --launcher.XXMaxPermSize
  256m
  -vmargs
  -Dosgi.requiredJavaVersion=1.5
  -Xms40m
  -Xmx512m

  The java version that is in path:

  java version 1.6.0_13
  Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
  Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

  I only checked the process in task manager, but I also made the
  columns for handles, threads and user objects visible. The number of
  threads was only about 40 which surprised me. (An fresh started
  Eclipse on my system has about 28 threads)

  Memory (Private working set) was about 400.000 kB. I did not check
  commit size, I tonigh when I got time to provoke Eclipse again. The
  paging size looked normal.

  I now saw that that Eclipse only used revision 5 of the Android SDK
  Tools. I started a fresh Eclipse, opened up Android SDK and AVD
  Manager, selected to install all available packages, and then bumbed
  into the same error again (so it took less than 2 minutes)

  Commit size is now 381.500 kB, Private working set 327.048 kB, Threads
  26, Handles 506

  On 5 Aug, 03:44, Bob Kerns r...@acm.org wrote:

   OK, this is good information. You are, in fact, running out of memory
   -- somehow.

   I've see this, but seldom as performance starts to suck for me long
   before.

   How exactly are you allocating memory for Java? How are you starting
   Eclipse?

   And when you were checking how much memory Eclipse was using, how did
   you check that, exactly? It sounds like you used the task manager --
   what is the exact title of the column you used? Task manager is not
   ideal for looking at this, but the only column that is actually
   relevant out of the 7 memory columns available is Memory - Commit
   size.  But the relationship between that and Java's GC'd heap memory
   allocation is tenuous. About the only thing you can say is that Memory
   - Commit size will be greater than the amount of memory Java is
   actively using in its heap.

   Did you check your paging file space? That's another way you can run
   

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-05 Thread Kaj Bjurman
Btw. I'm actually not sure that the problem really is an out of memory
exception. Yes, the log says so, but I think it's caused by an other
unhandled exception, and then something is catching that exception and
throws an out of memory exception. Don't know why, but that is a hunch
that I get.



On 5 Aug, 09:09, Bob Kerns r...@acm.org wrote:
 OK. I'm not 100% certain that the command line will take precedence
 over the eclipse.ini. You might want to edit the -Xmx512m there.

 Except that with a drive letter like L:, I'm surmising that you're
 running it from a network share? This may cause some significant
 performance problems, and is not something I would recommend. That
 wouldn't cause you to run out of memory, though. But you might want to
 experiment with a local copy.

 Private working set is not relevant to running out of memory. working
 set merely indicates, out of all the memory allocated in this
 process, how much is actually in RAM? It is relevant to competing for
 RAM with other processes, and thus paging slowdowns.

 By Commit size is now 381.500 kB, you mean 381.5 MB? For this one
 process? (Just checking). That is perhaps about right for a setting of
 -Xmx512m, with the GC factored in, etc. It is not consistent with
 running out of a  1GB allocation. (And I'm not sure the 32-bit
 version of Java can actually handle a heap of that size; I don't
 recall the limit, but I think you're not that far from it at best. I
 do recall it changing from release to release and finding a server
 stopped working as a result...) So one possibility is that the Eclipse
 launcher may be dropping that setting without telling you, just
 because it's too big.

 One thing you can do, if you haven't already: In Eclipse, go to
 Windows / Preferences... / General and check Show Heap Status. This
 puts a field in the status bar that shows Java's idea of how much Java
 heap it has allocated, and the current limit (i.e. the upper number
 will grow from -XmsXXXm to -XmxYYYm). This is an easy way to see
 Eclipse's GC status.

 On Aug 4, 10:37 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:



  Eclipse is started using a shortcut:

  Galileo
  L:\eclipse-jee-galileo-win32\eclipse\eclipse.exe -vmargs -Xmx1324m

  Ganymede
  L:\eclipse\eclipse.exe -vmargs -Xmx1324m

  (I'm having the same problem in both)

  eclipse.ini says:

  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
  -startup
  plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
  -product
  org.eclipse.epp.package.jee.product
  --launcher.XXMaxPermSize
  256M
  -showsplash
  org.eclipse.platform
  --launcher.XXMaxPermSize
  256m
  -vmargs
  -Dosgi.requiredJavaVersion=1.5
  -Xms40m
  -Xmx512m

  The java version that is in path:

  java version 1.6.0_13
  Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
  Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

  I only checked the process in task manager, but I also made the
  columns for handles, threads and user objects visible. The number of
  threads was only about 40 which surprised me. (An fresh started
  Eclipse on my system has about 28 threads)

  Memory (Private working set) was about 400.000 kB. I did not check
  commit size, I tonigh when I got time to provoke Eclipse again. The
  paging size looked normal.

  I now saw that that Eclipse only used revision 5 of the Android SDK
  Tools. I started a fresh Eclipse, opened up Android SDK and AVD
  Manager, selected to install all available packages, and then bumbed
  into the same error again (so it took less than 2 minutes)

  Commit size is now 381.500 kB, Private working set 327.048 kB, Threads
  26, Handles 506

  On 5 Aug, 03:44, Bob Kerns r...@acm.org wrote:

   OK, this is good information. You are, in fact, running out of memory
   -- somehow.

   I've see this, but seldom as performance starts to suck for me long
   before.

   How exactly are you allocating memory for Java? How are you starting
   Eclipse?

   And when you were checking how much memory Eclipse was using, how did
   you check that, exactly? It sounds like you used the task manager --
   what is the exact title of the column you used? Task manager is not
   ideal for looking at this, but the only column that is actually
   relevant out of the 7 memory columns available is Memory - Commit
   size.  But the relationship between that and Java's GC'd heap memory
   allocation is tenuous. About the only thing you can say is that Memory
   - Commit size will be greater than the amount of memory Java is
   actively using in its heap.

   Did you check your paging file space? That's another way you can run
   out of memory.

   And finally, it may report this error when you've run out of native
   threads.  That is, in fact, WHERE you are running out of memory,
   though it may not be the specific cause. Check the Threads column.

   With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
   leak. In fact, 

Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson

I'll have to explicitly 100% agree with Bob here:

Until around mid May I was using the previous model MacBookPro with 4GB 
dual core (and Ubuntu) for my Android development and after a fair 
amount of tweaking I could barely run Eclipse for a week.


After switching to the new MacBookPro with 8GB and quad core, Eclipse is 
no longer a real issue. Sure an SSD would be nice, but no deal breaker 
(not enough to pay more for a smaller disk).


Good luck / Jonas

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Mystique
I think there's some memory leak issue if editing XML files.
I realise if I only open .java it is ok.
So maybe a temp work around is to edit xml file with editor and open
only .java in eclipse?

On Aug 4, 10:17 am, Doug beafd...@gmail.com wrote:
 The issue isn't what else is running on the computer.  The issue is
 that Eclipse gets into an unrecoverable state where it lags horribly
 when switching between editors, at least on OSX.  I can typically go 5
 or 6 hours of steady use (more with intermittent use) until that state
 kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
 apps at that point doesn't make any difference.  The resource leak
 explanation is the only one that makes sense given my observations,
 which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson

I may be kicking in open doors here, but have you tried this old stuff?

http://www.luisdelarosa.com/2005/04/03/how-to-get-better-memory-settings-for-eclipse-on-mac-os-x/

For me (Ubuntu - see previous post for details) this worked fairly OK on 
my old 4GB system:


eclipse -Xmx150m

This included a fair bit of XML editing on top of java. (I did lot of 
GUI stuff around that time.)


I can't say I love Eclipse (I'm an old emacs addict), but it's not too 
shabby once you got the memory handling under some control (on a fast 
machine) - known alternatives considered.


Good luck / Jonas

On 08/04/2010 04:17 AM, Doug wrote:

The issue isn't what else is running on the computer.  The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX.  I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
apps at that point doesn't make any difference.  The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Kostya Vasilyev

This looks likely.

I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my 
layouts by hand, without the visual editor.


-- Kostya

04.08.2010 11:00, Mystique пишет:

I think there's some memory leak issue if editing XML files.
I realise if I only open .java it is ok.
So maybe a temp work around is to edit xml file with editor and open
only .java in eclipse?

On Aug 4, 10:17 am, Dougbeafd...@gmail.com  wrote:
   

The issue isn't what else is running on the computer.  The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX.  I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
apps at that point doesn't make any difference.  The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.
 
   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson
Ah, I think I can relate to that statement: for 95+% of the XML editing 
I referred to I used Eclipse itself, but like Kostya I stayed mostly in 
the XML view, only an occasional glance at the graphical layout since 
(at least for my cases) I decided the visual layout could not really be 
trusted. Showing it in the emulator was the only way to know that it 
actually worked as expected (yes, I had a rather picky spec to follow 
and in a few cases I actually pulled out emacs for significant 
restructuring, so I may have accidentally been lucky to manage for a week).


Best / Jonas

On 08/04/2010 11:55 AM, Kostya Vasilyev wrote:

This looks likely.

I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my
layouts by hand, without the visual editor.



04.08.2010 11:00, Mystique пишет:

I think there's some memory leak issue if editing XML files.
I realise if I only open .java it is ok.
So maybe a temp work around is to edit xml file with editor and open
only .java in eclipse?

On Aug 4, 10:17 am, Dougbeafd...@gmail.com wrote:

The issue isn't what else is running on the computer. The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX. I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo). Quitting other
apps at that point doesn't make any difference. The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread objectuser
Here are the settings I changed in my eclipse.ini after encountering
this problem:

-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/
java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms1024m
-Xmx1024m

I can code all day long and leave Eclipse open for a week at a time,
and have no issues.  It's only when doing Android stuff that I have
these issues.  In fact, while doing some iPhone development, I had the
iPhone environment up (Xcode, Simulator) with Eclipse and a Java
server (Tomcat, MySQL), all with Firefox and iTunes up and running,
and did not have this problem.  And I don't need to run the Android
Emulator for it to happen.

I'm going to try not using any of the Android resource editors and see
how that goes (I currently only use the source tab of these editors
and that still causes the issue).

On Aug 4, 6:46 am, Jonas Petersson jonas.peters...@xms.se wrote:
 Ah, I think I can relate to that statement: for 95+% of the XML editing
 I referred to I used Eclipse itself, but like Kostya I stayed mostly in
 the XML view, only an occasional glance at the graphical layout since
 (at least for my cases) I decided the visual layout could not really be
 trusted. Showing it in the emulator was the only way to know that it
 actually worked as expected (yes, I had a rather picky spec to follow
 and in a few cases I actually pulled out emacs for significant
 restructuring, so I may have accidentally been lucky to manage for a week).

                         Best / Jonas

 On 08/04/2010 11:55 AM, Kostya Vasilyev wrote:

  This looks likely.

  I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my
  layouts by hand, without the visual editor.

  04.08.2010 11:00, Mystique пишет:
  I think there's some memory leak issue if editing XML files.
  I realise if I only open .java it is ok.
  So maybe a temp work around is to edit xml file with editor and open
  only .java in eclipse?

  On Aug 4, 10:17 am, Dougbeafd...@gmail.com wrote:
  The issue isn't what else is running on the computer. The issue is
  that Eclipse gets into an unrecoverable state where it lags horribly
  when switching between editors, at least on OSX. I can typically go 5
  or 6 hours of steady use (more with intermittent use) until that state
  kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo). Quitting other
  apps at that point doesn't make any difference. The resource leak
  explanation is the only one that makes sense given my observations,
  which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Kaj Bjurman
I think it was stated previously in this thread. The problem isn't
Eclipse. The problem is the Android plugin. I'm using Eclipse more
than 8h per day at work, and I don't have any problems there (I'm not
doing any Android development at work). I can also use Eclipse at home
without any problems if I never switch to the design view, or edit
Android xml files. Switching to design view or editing xml files means
that my Eclipse (tested several different versions) craches within one
hour. Often several times per hour, and it's always a related to a
memory problem, and it's due to leaking handles. Looks like it's
either directly related to editing, or generation of R.

(And I'm having a 64 bit machine with 8 GB of RAM)


On 4 Aug, 13:46, Jonas Petersson jonas.peters...@xms.se wrote:
 Ah, I think I can relate to that statement: for 95+% of the XML editing
 I referred to I used Eclipse itself, but like Kostya I stayed mostly in
 the XML view, only an occasional glance at the graphical layout since
 (at least for my cases) I decided the visual layout could not really be
 trusted. Showing it in the emulator was the only way to know that it
 actually worked as expected (yes, I had a rather picky spec to follow
 and in a few cases I actually pulled out emacs for significant
 restructuring, so I may have accidentally been lucky to manage for a week).

                         Best / Jonas

 On 08/04/2010 11:55 AM, Kostya Vasilyev wrote:



  This looks likely.

  I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my
  layouts by hand, without the visual editor.

  04.08.2010 11:00, Mystique пишет:
  I think there's some memory leak issue if editing XML files.
  I realise if I only open .java it is ok.
  So maybe a temp work around is to edit xml file with editor and open
  only .java in eclipse?

  On Aug 4, 10:17 am, Dougbeafd...@gmail.com wrote:
  The issue isn't what else is running on the computer. The issue is
  that Eclipse gets into an unrecoverable state where it lags horribly
  when switching between editors, at least on OSX. I can typically go 5
  or 6 hours of steady use (more with intermittent use) until that state
  kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo). Quitting other
  apps at that point doesn't make any difference. The resource leak
  explanation is the only one that makes sense given my observations,
  which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Jonas Petersson

On 08/04/2010 05:00 PM, Kaj Bjurman wrote:

I think it was stated previously in this thread. The problem isn't
Eclipse. The problem is the Android plugin.


I would agree on that one, I use Eclipse for Flex and although there are 
other kinds of issues there, the Andorid plugins appears to be the culprit.



I'm using Eclipse more
than 8h per day at work, and I don't have any problems there (I'm not
doing any Android development at work). I can also use Eclipse at home
without any problems if I never switch to the design view, or edit
Android xml files.


This is what I did not experience. I could work full time in an Android 
project for a week with a fair bit of editing Android XML files (though 
minimally in the design view). This was on a MacBookPro with 4GB of ram, 
running Ubuntu 9.10 - note that for various reasons I was using the 
32bit version and hence needed the PAE kernel. I doubt the PAE makes a 
difference, but 32bit might?



Switching to design view or editing xml files means
that my Eclipse (tested several different versions) craches within one
hour. Often several times per hour, and it's always a related to a
memory problem, and it's due to leaking handles. Looks like it's
either directly related to editing, or generation of R.

(And I'm having a 64 bit machine with 8 GB of RAM)


Ouch! That *IS* bad. I can see why you get frustrated from that. I 
thought I had a bad time when I was only on 3GB for a while, but even 
then I'd be OK for at least 4 hours. Obviously our context differs. I'm 
using Galileo, btw. Seemed like an improvement over Ganymedes overall, 
but I doubt the plugin works differently.


Mad thought: On a 8GB system you could run a Vmware/VirtualBox 
installation with 4GB of what I outlined above to see if it works better 
(I do that trick for a mobile platform that doesn't fully support Ubuntu 
yet).


Your mileage varies! / Jonas

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread DanH
The Eclipse UI editor for Qt (which is similarly XML based) exhibits
similar behavior -- some things you can do OK, but certain complex
operations crash the editor (and sometimes Eclipse) with fair
regularity.  You learn to save your layouts frequently.

Re poor performance in general, folks with Win64 should start Task
Manager from time to time and note CPU usage.  There is a bug rampant
in Vista and not unlikely in Win7 that causes some sort of background
activity causing 40-60% CPU utilization, with nothing else going on,
and no process showing more than 2%.  (System Idle Process shows
85-90%.)  Folks with desktop boxes might miss this, but folks with
laptops notice it because the CPU fan is running full bore when
nothing is going on.  Once this scenario starts you can only kill it
by rebooting or hibernating.

Another performance killer is the Windows indexing service.

On Aug 4, 10:00 am, Kaj Bjurman kaj.bjur...@gmail.com wrote:
 I think it was stated previously in this thread. The problem isn't
 Eclipse. The problem is the Android plugin. I'm using Eclipse more
 than 8h per day at work, and I don't have any problems there (I'm not
 doing any Android development at work). I can also use Eclipse at home
 without any problems if I never switch to the design view, or edit
 Android xml files. Switching to design view or editing xml files means
 that my Eclipse (tested several different versions) craches within one
 hour. Often several times per hour, and it's always a related to a
 memory problem, and it's due to leaking handles. Looks like it's
 either directly related to editing, or generation of R.

 (And I'm having a 64 bit machine with 8 GB of RAM)

 On 4 Aug, 13:46, Jonas Petersson jonas.peters...@xms.se wrote:

  Ah, I think I can relate to that statement: for 95+% of the XML editing
  I referred to I used Eclipse itself, but like Kostya I stayed mostly in
  the XML view, only an occasional glance at the graphical layout since
  (at least for my cases) I decided the visual layout could not really be
  trusted. Showing it in the emulator was the only way to know that it
  actually worked as expected (yes, I had a rather picky spec to follow
  and in a few cases I actually pulled out emacs for significant
  restructuring, so I may have accidentally been lucky to manage for a week).

                          Best / Jonas

  On 08/04/2010 11:55 AM, Kostya Vasilyev wrote:

   This looks likely.

   I can run Eclipse all day on a 4G Windows 64bit machine, but I edit my
   layouts by hand, without the visual editor.

   04.08.2010 11:00, Mystique пишет:
   I think there's some memory leak issue if editing XML files.
   I realise if I only open .java it is ok.
   So maybe a temp work around is to edit xml file with editor and open
   only .java in eclipse?

   On Aug 4, 10:17 am, Dougbeafd...@gmail.com wrote:
   The issue isn't what else is running on the computer. The issue is
   that Eclipse gets into an unrecoverable state where it lags horribly
   when switching between editors, at least on OSX. I can typically go 5
   or 6 hours of steady use (more with intermittent use) until that state
   kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo). Quitting other
   apps at that point doesn't make any difference. The resource leak
   explanation is the only one that makes sense given my observations,
   which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Kaj Bjurman
I just provoked my Eclipse again, just to see what the error message
is. I remembered it as out of handles, but that was a bit wrong. I
checked the process in the task manager when it was in the error
state. It isn't out of memory, and it's probably not out of handles.
The CPUs are also idle, so nothing is spinning.

The error from Eclipse is a dialog that says:

Multiple problems have occured (as title)

The error message is then, unable to create new native thread.

Followed by a textfield that is displaying:

Collecting garbage
Collecting garbage
Unhandled event loop exception

unable to create new native thread


The eclipse error log can be seen below.

Eclipse was at that time taking about 400 MB of memory (of the 1300M
that I had assigned to the VM)

It took me about 10-15 minutes. All I did was editing one layout file,
switched between layout view, then edited the xml directly, changed
some properties through the property view, saved quite frequently,
even with compilation errors, and also tried keep editing while it was
saving.

This never happens when I write code in Eclipse.



!ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414
!MESSAGE Problems occurred when invoking code from plug-in:
org.eclipse.core.resources.
!STACK 1
org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
Build aborted.
at
com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
Source)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
170)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
201)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
256)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
309)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
341)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
140)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
!MESSAGE 'aapt' error. Pre Compiler Build aborted.
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
!MESSAGE 'aapt' error. Pre Compiler Build aborted.

!ENTRY org.eclipse.ui 4 0 2010-08-04 22:45:29.067
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at org.eclipse.jface.text.contentassist.AdditionalInfoController
$Timer.init(AdditionalInfoController.java:244)
at org.eclipse.jface.text.contentassist.AdditionalInfoController
$10.init(AdditionalInfoController.java:457)
at
org.eclipse.jface.text.contentassist.AdditionalInfoController.install(AdditionalInfoController.java:
457)
at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.displayProposals(CompletionProposalPopup.java:
1198)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access
$23(CompletionProposalPopup.java:1157)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup
$2.run(CompletionProposalPopup.java:500)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
70)
at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:
482)
at
org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:
1660)
at
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.doOperation(StructuredTextViewer.java:
446)
at org.eclipse.ui.texteditor.TextOperationAction
$1.run(TextOperationAction.java:131)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
70)
at
org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:
129)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:
185)
at
org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:
109)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:
476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:
508)
at

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Bob Kerns
OK, this is good information. You are, in fact, running out of memory
-- somehow.

I've see this, but seldom as performance starts to suck for me long
before.

How exactly are you allocating memory for Java? How are you starting
Eclipse?

And when you were checking how much memory Eclipse was using, how did
you check that, exactly? It sounds like you used the task manager --
what is the exact title of the column you used? Task manager is not
ideal for looking at this, but the only column that is actually
relevant out of the 7 memory columns available is Memory - Commit
size.  But the relationship between that and Java's GC'd heap memory
allocation is tenuous. About the only thing you can say is that Memory
- Commit size will be greater than the amount of memory Java is
actively using in its heap.

Did you check your paging file space? That's another way you can run
out of memory.

And finally, it may report this error when you've run out of native
threads.  That is, in fact, WHERE you are running out of memory,
though it may not be the specific cause. Check the Threads column.

With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
leak. In fact, my thread count was initially 47, went up to 52 briefly
while auto-building my project, and then as I started looking at
layouts, it has gone down to 37, and I don't seem to find anything
with layouts that bumps it up at all.

If you see a different behavior, then we have a clue. (Otherwise, it's
still a clue, but a weak one).

On Aug 4, 2:00 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:
 I just provoked my Eclipse again, just to see what the error message
 is. I remembered it as out of handles, but that was a bit wrong. I
 checked the process in the task manager when it was in the error
 state. It isn't out of memory, and it's probably not out of handles.
 The CPUs are also idle, so nothing is spinning.

 The error from Eclipse is a dialog that says:

 Multiple problems have occured (as title)

 The error message is then, unable to create new native thread.

 Followed by a textfield that is displaying:

 Collecting garbage
 Collecting garbage
 Unhandled event loop exception

 unable to create new native thread

 The eclipse error log can be seen below.

 Eclipse was at that time taking about 400 MB of memory (of the 1300M
 that I had assigned to the VM)

 It took me about 10-15 minutes. All I did was editing one layout file,
 switched between layout view, then edited the xml directly, changed
 some properties through the property view, saved quite frequently,
 even with compilation errors, and also tried keep editing while it was
 saving.

 This never happens when I write code in Eclipse.

 !ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414
 !MESSAGE Problems occurred when invoking code from plug-in:
 org.eclipse.core.resources.
 !STACK 1
 org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
 Build aborted.
         at
 com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
 Source)
         at
 com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
 Source)
         at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:627)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 170)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 201)
         at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:253)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 256)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
 ava:
 309)
         at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 341)
         at
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
 140)
         at
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
 238)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
 !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
 !MESSAGE 'aapt' error. Pre Compiler Build aborted.
 !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
 !MESSAGE 'aapt' error. Pre Compiler Build aborted.

 !ENTRY org.eclipse.ui 4 0 2010-08-04 22:45:29.067
 !MESSAGE Unhandled event loop exception
 !STACK 0
 java.lang.OutOfMemoryError: unable to create new native thread
         at java.lang.Thread.start0(Native Method)
         at java.lang.Thread.start(Unknown Source)
         at org.eclipse.jface.text.contentassist.AdditionalInfoController
 $Timer.init(AdditionalInfoController.java:244)
         at org.eclipse.jface.text.contentassist.AdditionalInfoController
 $10.init(AdditionalInfoController.java:457)
         at
 

Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Shane Isbell
I just say 'Serenity Now' and count to 10. The layout file usually opens by
that point.

On Wed, Aug 4, 2010 at 6:44 PM, Bob Kerns r...@acm.org wrote:

 OK, this is good information. You are, in fact, running out of memory
 -- somehow.

 I've see this, but seldom as performance starts to suck for me long
 before.

 How exactly are you allocating memory for Java? How are you starting
 Eclipse?

 And when you were checking how much memory Eclipse was using, how did
 you check that, exactly? It sounds like you used the task manager --
 what is the exact title of the column you used? Task manager is not
 ideal for looking at this, but the only column that is actually
 relevant out of the 7 memory columns available is Memory - Commit
 size.  But the relationship between that and Java's GC'd heap memory
 allocation is tenuous. About the only thing you can say is that Memory
 - Commit size will be greater than the amount of memory Java is
 actively using in its heap.

 Did you check your paging file space? That's another way you can run
 out of memory.

 And finally, it may report this error when you've run out of native
 threads.  That is, in fact, WHERE you are running out of memory,
 though it may not be the specific cause. Check the Threads column.

 With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
 leak. In fact, my thread count was initially 47, went up to 52 briefly
 while auto-building my project, and then as I started looking at
 layouts, it has gone down to 37, and I don't seem to find anything
 with layouts that bumps it up at all.

 If you see a different behavior, then we have a clue. (Otherwise, it's
 still a clue, but a weak one).

 On Aug 4, 2:00 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:
  I just provoked my Eclipse again, just to see what the error message
  is. I remembered it as out of handles, but that was a bit wrong. I
  checked the process in the task manager when it was in the error
  state. It isn't out of memory, and it's probably not out of handles.
  The CPUs are also idle, so nothing is spinning.
 
  The error from Eclipse is a dialog that says:
 
  Multiple problems have occured (as title)
 
  The error message is then, unable to create new native thread.
 
  Followed by a textfield that is displaying:
 
  Collecting garbage
  Collecting garbage
  Unhandled event loop exception
 
  unable to create new native thread
 
  The eclipse error log can be seen below.
 
  Eclipse was at that time taking about 400 MB of memory (of the 1300M
  that I had assigned to the VM)
 
  It took me about 10-15 minutes. All I did was editing one layout file,
  switched between layout view, then edited the xml directly, changed
  some properties through the property view, saved quite frequently,
  even with compilation errors, and also tried keep editing while it was
  saving.
 
  This never happens when I write code in Eclipse.
 
  !ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414
  !MESSAGE Problems occurred when invoking code from plug-in:
  org.eclipse.core.resources.
  !STACK 1
  org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
  Build aborted.
  at
  com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
  Source)
  at
 
 com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
  Source)
  at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:627)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at
 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  170)
  at
 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  201)
  at org.eclipse.core.internal.events.BuildManager
  $1.run(BuildManager.java:253)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at
 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  256)
  at
 
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j
 ava:
  309)
  at
  org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
  341)
  at
  org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
  140)
  at
  org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
  238)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
  !MESSAGE 'aapt' error. Pre Compiler Build aborted.
  !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
  !MESSAGE 'aapt' error. Pre Compiler Build aborted.
 
  !ENTRY org.eclipse.ui 4 0 2010-08-04 22:45:29.067
  !MESSAGE Unhandled event loop exception
  !STACK 0
  java.lang.OutOfMemoryError: unable to create new native thread
  at java.lang.Thread.start0(Native Method)
  at java.lang.Thread.start(Unknown Source)
  at 

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Kaj Bjurman
Eclipse is started using a shortcut:

Galileo
L:\eclipse-jee-galileo-win32\eclipse\eclipse.exe -vmargs -Xmx1324m

Ganymede
L:\eclipse\eclipse.exe -vmargs -Xmx1324m

(I'm having the same problem in both)

eclipse.ini says:



--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m


The java version that is in path:

java version 1.6.0_13
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

I only checked the process in task manager, but I also made the
columns for handles, threads and user objects visible. The number of
threads was only about 40 which surprised me. (An fresh started
Eclipse on my system has about 28 threads)

Memory (Private working set) was about 400.000 kB. I did not check
commit size, I tonigh when I got time to provoke Eclipse again. The
paging size looked normal.

I now saw that that Eclipse only used revision 5 of the Android SDK
Tools. I started a fresh Eclipse, opened up Android SDK and AVD
Manager, selected to install all available packages, and then bumbed
into the same error again (so it took less than 2 minutes)

Commit size is now 381.500 kB, Private working set 327.048 kB, Threads
26, Handles 506






On 5 Aug, 03:44, Bob Kerns r...@acm.org wrote:
 OK, this is good information. You are, in fact, running out of memory
 -- somehow.

 I've see this, but seldom as performance starts to suck for me long
 before.

 How exactly are you allocating memory for Java? How are you starting
 Eclipse?

 And when you were checking how much memory Eclipse was using, how did
 you check that, exactly? It sounds like you used the task manager --
 what is the exact title of the column you used? Task manager is not
 ideal for looking at this, but the only column that is actually
 relevant out of the 7 memory columns available is Memory - Commit
 size.  But the relationship between that and Java's GC'd heap memory
 allocation is tenuous. About the only thing you can say is that Memory
 - Commit size will be greater than the amount of memory Java is
 actively using in its heap.

 Did you check your paging file space? That's another way you can run
 out of memory.

 And finally, it may report this error when you've run out of native
 threads.  That is, in fact, WHERE you are running out of memory,
 though it may not be the specific cause. Check the Threads column.

 With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
 leak. In fact, my thread count was initially 47, went up to 52 briefly
 while auto-building my project, and then as I started looking at
 layouts, it has gone down to 37, and I don't seem to find anything
 with layouts that bumps it up at all.

 If you see a different behavior, then we have a clue. (Otherwise, it's
 still a clue, but a weak one).

 On Aug 4, 2:00 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:



  I just provoked my Eclipse again, just to see what the error message
  is. I remembered it as out of handles, but that was a bit wrong. I
  checked the process in the task manager when it was in the error
  state. It isn't out of memory, and it's probably not out of handles.
  The CPUs are also idle, so nothing is spinning.

  The error from Eclipse is a dialog that says:

  Multiple problems have occured (as title)

  The error message is then, unable to create new native thread.

  Followed by a textfield that is displaying:

  Collecting garbage
  Collecting garbage
  Unhandled event loop exception

  unable to create new native thread

  The eclipse error log can be seen below.

  Eclipse was at that time taking about 400 MB of memory (of the 1300M
  that I had assigned to the VM)

  It took me about 10-15 minutes. All I did was editing one layout file,
  switched between layout view, then edited the xml directly, changed
  some properties through the property view, saved quite frequently,
  even with compilation errors, and also tried keep editing while it was
  saving.

  This never happens when I write code in Eclipse.

  !ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414
  !MESSAGE Problems occurred when invoking code from plug-in:
  org.eclipse.core.resources.
  !STACK 1
  org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
  Build aborted.
          at
  com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
  Source)
          at
  com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
  Source)
          at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:627)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
  

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-04 Thread Kaj Bjurman
(And the workspace is using 1.5.0_19)

On 5 Aug, 03:44, Bob Kerns r...@acm.org wrote:
 OK, this is good information. You are, in fact, running out of memory
 -- somehow.

 I've see this, but seldom as performance starts to suck for me long
 before.

 How exactly are you allocating memory for Java? How are you starting
 Eclipse?

 And when you were checking how much memory Eclipse was using, how did
 you check that, exactly? It sounds like you used the task manager --
 what is the exact title of the column you used? Task manager is not
 ideal for looking at this, but the only column that is actually
 relevant out of the 7 memory columns available is Memory - Commit
 size.  But the relationship between that and Java's GC'd heap memory
 allocation is tenuous. About the only thing you can say is that Memory
 - Commit size will be greater than the amount of memory Java is
 actively using in its heap.

 Did you check your paging file space? That's another way you can run
 out of memory.

 And finally, it may report this error when you've run out of native
 threads.  That is, in fact, WHERE you are running out of memory,
 though it may not be the specific cause. Check the Threads column.

 With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread
 leak. In fact, my thread count was initially 47, went up to 52 briefly
 while auto-building my project, and then as I started looking at
 layouts, it has gone down to 37, and I don't seem to find anything
 with layouts that bumps it up at all.

 If you see a different behavior, then we have a clue. (Otherwise, it's
 still a clue, but a weak one).

 On Aug 4, 2:00 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:



  I just provoked my Eclipse again, just to see what the error message
  is. I remembered it as out of handles, but that was a bit wrong. I
  checked the process in the task manager when it was in the error
  state. It isn't out of memory, and it's probably not out of handles.
  The CPUs are also idle, so nothing is spinning.

  The error from Eclipse is a dialog that says:

  Multiple problems have occured (as title)

  The error message is then, unable to create new native thread.

  Followed by a textfield that is displaying:

  Collecting garbage
  Collecting garbage
  Unhandled event loop exception

  unable to create new native thread

  The eclipse error log can be seen below.

  Eclipse was at that time taking about 400 MB of memory (of the 1300M
  that I had assigned to the VM)

  It took me about 10-15 minutes. All I did was editing one layout file,
  switched between layout view, then edited the xml directly, changed
  some properties through the property view, saved quite frequently,
  even with compilation errors, and also tried keep editing while it was
  saving.

  This never happens when I write code in Eclipse.

  !ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414
  !MESSAGE Problems occurred when invoking code from plug-in:
  org.eclipse.core.resources.
  !STACK 1
  org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler
  Build aborted.
          at
  com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown
  Source)
          at
  com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown
  Source)
          at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:627)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  170)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  201)
          at org.eclipse.core.internal.events.BuildManager
  $1.run(BuildManager.java:253)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  256)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
  ava:
  309)
          at
  org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
  341)
          at
  org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
  140)
          at
  org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
  238)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
  !MESSAGE 'aapt' error. Pre Compiler Build aborted.
  !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414
  !MESSAGE 'aapt' error. Pre Compiler Build aborted.

  !ENTRY org.eclipse.ui 4 0 2010-08-04 22:45:29.067
  !MESSAGE Unhandled event loop exception
  !STACK 0
  java.lang.OutOfMemoryError: unable to create new native thread
          at java.lang.Thread.start0(Native Method)
          at java.lang.Thread.start(Unknown Source)
          at org.eclipse.jface.text.contentassist.AdditionalInfoController
  

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
It's long been my opinion that the minimum development environment
should be 8 GB, quad core. And, ideally, solid-state disks.

Definitely *NOT* a 5200 RPM or slower hard drive! Ever!

I run on a 4GB, dual core laptop, SATA 7200 RPM hard drive. But I've
also run on 8 GB, quad core, and know what a difference it makes.

I figure there's no point in replacing my computer until I can hit
that benchmark. This was the benchmark about 4 years ago.

But it makes a HUGE difference what else you are running. Here are
some of the worst offenders:
* GMail -- any browser.
* Firefox -- any content
* Eclipse -- don't open more stuff than you need. And you can
experiment with giving it more memory, so it doesn't have to GC quite
as often. But that makes the GCs it does do touch somewhat more pages.

Also, make sure your hard drive is defragmented, and that you clean up
your temp directories from time to time. A huge temp directory can
make a lot of things really beat on the disk as they do trivial things
with tiny temp files. It's surprisingly easy to get a huge temp
directory over time.

And finally: Pay attention to antivirus and online backup software
configuration. You do NOT want your antivirus software looking at
every file you touch in your build tree. You do NOT want your backup
software instantly backing up every intermediate file created during
the build process.

Still, insufficient memory is the biggest cause of poor development
environment performance in my experience. Eclipse does a huge amount
of stuff for you, but it requires RAM to hold all that parse data,
etc. Closing editor buffers, projects you don't actively need (like
the demo project!), etc. can significantly reduce Eclipse's memory
usage.


On Jul 30, 4:22 am, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I'm on Win7 32-bit with 4GB RAM. Why my Eclipse always become so slow
 until it take so long to response to my mouse or keyboard. I have to
 force terminate it, restart and use it for like 20min and repeat the
 same thing again...

 Anyone facing this or have experience dealing with it?

 Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Doug
The issue isn't what else is running on the computer.  The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX.  I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
apps at that point doesn't make any difference.  The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread objectuser
Doug, I'm surprised you can go for 5 or 6 hours.  It grinds to a halt
for me in less than an hour.  But I guess it depends on what you're
doing (Java vs resources).

But I'll echo what you said: it's not that the IDE is generally slow,
it's something else that is chewing up resources.  It's not the
emulator, as I can exit that and Eclipse is still the same.  As people
reported above, you can code all you like, but it seems that if you
mess with the resource files, you're doomed.

On Aug 3, 9:17 pm, Doug beafd...@gmail.com wrote:
 The issue isn't what else is running on the computer.  The issue is
 that Eclipse gets into an unrecoverable state where it lags horribly
 when switching between editors, at least on OSX.  I can typically go 5
 or 6 hours of steady use (more with intermittent use) until that state
 kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
 apps at that point doesn't make any difference.  The resource leak
 explanation is the only one that makes sense given my observations,
 which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
You missed my point, so let me try to make it more clearly.

I wasn't absolving the IDE of blame. I'm saying it interacts with the
other offenders, if you have them.

So if you have a bloated Firefox, for example, the IDE will start to
flail much earlier. In that case, you can buy some time (but not
eliminate the problem) by killing Firefox.

My point about memory is that you will survive MUCH longer on a less
limited machine, and upgrading your hardware is another workaround.
One that I haven't found financially viable at the moment, but, if you
can, definitely try it.

And as objectuser points out, not all aspects of the IDE are to blame.

Running an emulator worsens things, since that needs memory.
Basically, everything you do that needs significant memory, will cause
you to start to flail earlier.

It's definitely not just Eclipse and Android, however. At 4 GB I can
end up in this state with various applications, without anything
Eclispe- or Android-related running.

I find I have to restart GMail (in Chrome, no less) about as often as
often as I have to restart Eclipse. Hmm, what do these two have in
common?

But that will depend on your usage patterns, too.

I will say, it is not just Android programming, and not just resource
files that will do Eclipse in. But I do think they worsen it -- either
making heavy use of a leaking facility, or adding their own new leaks
to the puddle.

So my advice is, restart Eclipse often, but also look at the other
factors. If you're lucky that will help reduce, but eliminate, the
need to restart.

On Aug 3, 7:17 pm, Doug beafd...@gmail.com wrote:
 The issue isn't what else is running on the computer.  The issue is
 that Eclipse gets into an unrecoverable state where it lags horribly
 when switching between editors, at least on OSX.  I can typically go 5
 or 6 hours of steady use (more with intermittent use) until that state
 kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
 apps at that point doesn't make any difference.  The resource leak
 explanation is the only one that makes sense given my observations,
 which are daily since I do this to pay my mortgage.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread objectuser
So everyone has this issue and they just deal with it?  I'm amazed to
find such a productivity killer in a platform that's been out for a
couple of years.  I'm hoping we are simply unenlightened and someone
will stop by with an easy fix. :)

I'm on OS X, 4GB RAM, core 2 duo, btw, using some settings I found
previously (run with 1.6, more memory, etc).

On Jul 30, 9:53 pm, Mystique joven.ch...@gmail.com wrote:
 I see. I thought I'm the only one...
 Yes, I look at the log and so many memory leak error...

 On Jul 30, 8:55 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:

  It has unfortunately been like that for ages (if you are modifying
  e.g. layout files). It doesn't happen if you only write code.

  It looks like the Android plugin is leaking resources, and fast.

  On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:

   Hi,

   I'm on Win7 32-bit with 4GB RAM. Why myEclipsealways become so slow
   until it take so long to response to my mouse or keyboard. I have to
   force terminate it, restart and use it for like 20min and repeat the
   same thing again...

   Anyone facing this or have experience dealing with it?

   Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Mystique
Hi, you mean in OSX is the same thing?

On Aug 3, 10:51 pm, objectuser kevin.k.le...@gmail.com wrote:
 So everyone has this issue and they just deal with it?  I'm amazed to
 find such a productivity killer in a platform that's been out for a
 couple of years.  I'm hoping we are simply unenlightened and someone
 will stop by with an easy fix. :)

 I'm on OS X, 4GB RAM, core 2 duo, btw, using some settings I found
 previously (run with 1.6, more memory, etc).

 On Jul 30, 9:53 pm, Mystique joven.ch...@gmail.com wrote:

  I see. I thought I'm the only one...
  Yes, I look at the log and so many memory leak error...

  On Jul 30, 8:55 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:

   It has unfortunately been like that for ages (if you are modifying
   e.g. layout files). It doesn't happen if you only write code.

   It looks like the Android plugin is leaking resources, and fast.

   On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:

Hi,

I'm on Win7 32-bit with 4GB RAM. Why myEclipsealways become so slow
until it take so long to response to my mouse or keyboard. I have to
force terminate it, restart and use it for like 20min and repeat the
same thing again...

Anyone facing this or have experience dealing with it?

Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread objectuser
Yes, same issue for me.  I need to restart Eclipse every few minutes
if I don't want to wait 10s to switch between Java files, etc.

On Aug 3, 10:08 am, Mystique joven.ch...@gmail.com wrote:
 Hi, you mean in OSX is the same thing?

 On Aug 3, 10:51 pm, objectuser kevin.k.le...@gmail.com wrote:

  So everyone has this issue and they just deal with it?  I'm amazed to
  find such a productivity killer in a platform that's been out for a
  couple of years.  I'm hoping we are simply unenlightened and someone
  will stop by with an easy fix. :)

  I'm on OS X, 4GB RAM, core 2 duo, btw, using some settings I found
  previously (run with 1.6, more memory, etc).

  On Jul 30, 9:53 pm, Mystique joven.ch...@gmail.com wrote:

   I see. I thought I'm the only one...
   Yes, I look at the log and so many memory leak error...

   On Jul 30, 8:55 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:

It has unfortunately been like that for ages (if you are modifying
e.g. layout files). It doesn't happen if you only write code.

It looks like the Android plugin is leaking resources, and fast.

On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:

 Hi,

 I'm on Win7 32-bit with 4GB RAM. Why myEclipsealways become so slow
 until it take so long to response to my mouse or keyboard. I have to
 force terminate it, restart and use it for like 20min and repeat the
 same thing again...

 Anyone facing this or have experience dealing with it?

 Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Adal
Doesn't happen to me.

Ubuntu Lucid, AMD Phenom II X4 945, 4GB RAM.

Emulator is slow when booting, but nothing else (I have to say that my
projects are tiny).

On Tue, Aug 3, 2010 at 5:32 PM, objectuser kevin.k.le...@gmail.com wrote:

 Yes, same issue for me.  I need to restart Eclipse every few minutes
 if I don't want to wait 10s to switch between Java files, etc.

 On Aug 3, 10:08 am, Mystique joven.ch...@gmail.com wrote:
  Hi, you mean in OSX is the same thing?
 
  On Aug 3, 10:51 pm, objectuser kevin.k.le...@gmail.com wrote:
 
   So everyone has this issue and they just deal with it?  I'm amazed to
   find such a productivity killer in a platform that's been out for a
   couple of years.  I'm hoping we are simply unenlightened and someone
   will stop by with an easy fix. :)
 
   I'm on OS X, 4GB RAM, core 2 duo, btw, using some settings I found
   previously (run with 1.6, more memory, etc).
 
   On Jul 30, 9:53 pm, Mystique joven.ch...@gmail.com wrote:
 
I see. I thought I'm the only one...
Yes, I look at the log and so many memory leak error...
 
On Jul 30, 8:55 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:
 
 It has unfortunately been like that for ages (if you are modifying
 e.g. layout files). It doesn't happen if you only write code.
 
 It looks like the Android plugin is leaking resources, and fast.
 
 On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:
 
  Hi,
 
  I'm on Win7 32-bit with 4GB RAM. Why myEclipsealways become so
 slow
  until it take so long to response to my mouse or keyboard. I have
 to
  force terminate it, restart and use it for like 20min and repeat
 the
  same thing again...
 
  Anyone facing this or have experience dealing with it?
 
  Regards.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-07-30 Thread Kaj Bjurman
It has unfortunately been like that for ages (if you are modifying
e.g. layout files). It doesn't happen if you only write code.

It looks like the Android plugin is leaking resources, and fast.

On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I'm on Win7 32-bit with 4GB RAM. Why my Eclipse always become so slow
 until it take so long to response to my mouse or keyboard. I have to
 force terminate it, restart and use it for like 20min and repeat the
 same thing again...

 Anyone facing this or have experience dealing with it?

 Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-07-30 Thread Mystique
I see. I thought I'm the only one...
Yes, I look at the log and so many memory leak error...

On Jul 30, 8:55 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote:
 It has unfortunately been like that for ages (if you are modifying
 e.g. layout files). It doesn't happen if you only write code.

 It looks like the Android plugin is leaking resources, and fast.

 On 30 Juli, 13:22, Mystique joven.ch...@gmail.com wrote:

  Hi,

  I'm on Win7 32-bit with 4GB RAM. Why my Eclipse always become so slow
  until it take so long to response to my mouse or keyboard. I have to
  force terminate it, restart and use it for like 20min and repeat the
  same thing again...

  Anyone facing this or have experience dealing with it?

  Regards.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en