I've tried posting this to the newsgroup a couple of times without success. I'm trying again. I apologize if this shows up multiple times.
Mark -----Original Message----- From: Tarlton Mark-CMT041 Sent: Tuesday, March 25, 2003 8:04 AM To: [EMAIL PROTECTED] Subject: updateData causes GC delay when running with IndexedTriangle Geometry This is a resend from yesterday. I didn't see it appear on the newsgroup so I'll try again . -------------------------- I'm working on an application that updates vertex coordinates in a triangle mesh every frame. The geometry is an IndexedTriangleArray and I've configured it with "BY_REFERENCE" update plus I implemented the GeometryUpdater interface. The program appears to run correctly except for a periodic pause every second or so. GC profiling indicates that a full GC pass is run and that the GC takes about .15 seconds to run. This appears to correspond to the pause that I'm seeing. The attached test case demonstrates this problem. I started with the SUN "GeometryByReferenceTest" demo and hacked it down to get rid of the U/I stuff. I added a "NullUpdateBehavior" that calls the updateData method on the geometry every frame. I don't actually do anything to the "updateData" method... just call it. The NullUpdateBehavior also rotates the shape a little every frame just to highlight the pause. Without the call to "updateData" the app runs smoothly. As far as I can tell, the performance of IndexedTriangleArray using BY_REF is the same as if BY_REF wasn't used and the vertex coordinates were simply replaced using "setCoordinates". Both techniques result in a brief pause every second that appears to be GC related. Also, I've only seen the problem appear with _Indexed_ geometry -- TriangleArray seems to work fine. I took a look through the bug data base and didn't see anything that looked relevant. This is under WinXP, NVIDIA G4 card. J3D 1.3.1beta and J2SDK 1.4.1 Any ideas? Mark ---------------------------------------------------------------------------- ------- Mark A. Tarlton, Visual Communications and Display Lab, Motorola Labs,
NullUpdateBehavior.zip
Description: Binary data
