Bug 180 - Improve garbage generation
Summary: Improve garbage generation
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
URL: http://www.javagaming.org/forums/inde...
Depends on:
Reported: 2005-11-03 12:41 CET by Sven Gothel
Modified: 2015-09-27 03:14 CEST (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:48:07 CET

---- Reported by kawin 2005-11-03 00:41:43 ----

The method com.sun.opengl.impl.GLImpl.checkBufferObject (in JSR-231 beta 1
release) generates 16 octets of garbage each time it is called. Since it is
likely to be called very often (thousands of times per frame) and since it is
very easy to reduce this garbage generation, it would be interesting to do so.

The proposed patch is to reuse a statically allocated int[1] instead of creating
one each time it is called. This won't cause any threading problem since the
method is already not thread-safe.

---- Additional Comments From kbr 2005-11-09 22:44:33 ----

Fixed by adding a private instance variable per GL object.

--- Bug imported by sgothel@jausoft.com 2010-03-24 07:48 EDT  ---

This bug was previously known as _bug_ 180 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=180