Project

Profile

Help

Bug #2230

Large number of class loaders created in byte code

Added by O'Neil Delpratt almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Byte code generation
Sprint/Milestone:
-
Start date:
2014-11-20
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Reported by Chris Lee:

Investigating the compiled memory usage for a series of 22 large/complex XSL templates compiled with Saxon EE 9.5.1.5 (bytecode optimization enabled) & cached. A large number of Class Loaders are present in the profile: ‘net.sf.saxon.java.JavaPlatform$1’ – 29,319 of them, for a retained size of ~10.5M (~8% of the total retained memory for stylesheets of ~133M).

Seems like there is one classloader for each generated class (compiled template)?

Bug present in Saxon 9.5 and 9.6.

History

#1 Updated by O'Neil Delpratt almost 7 years ago

  • Status changed from New to In Progress

Bug fix applied to Saxon 9.6 and 9.7 branches. The fix was to sub-class the ClassLoader which keeps a map of Class objects created. This avoid creating multiple ClassLoader objected. Still in testing.

#2 Updated by O'Neil Delpratt almost 7 years ago

Bug fix also required in the Saxon 9.5 branch

#3 Updated by O'Neil Delpratt almost 7 years ago

  • Status changed from In Progress to Resolved

Bug fixed applied in Saxon 9.5, 9.6 and 9.7.

Memory performance test carried out proved that the new mechanism has given an approximate saving of 25% for the xquery30keywords2 test case which created over 200 class objects in the bytecode generation.

#4 Updated by O'Neil Delpratt almost 7 years ago

Bug fix patched applied in the Saxon 9.6.0.3 maintenance release. Leaving this bug issue with status resolved until bug fix applied in the 9.5 maintenance release

#5 Updated by O'Neil Delpratt almost 7 years ago

  • Found in version changed from 9.5 to 9.5 9.6

#6 Updated by O'Neil Delpratt almost 7 years ago

  • Fixed in version set to 9.6.0.3

#7 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Found in version changed from 9.5 9.6 to 9.6
  • Fixed in version changed from 9.6.0.3 to 9.6.0.5

Bug fix applied in the Saxon 9.6.0.5 maintenance release.

#8 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Closed to Resolved
  • Found in version changed from 9.6 to 9.5 9.6

#9 Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in version changed from 9.6.0.5 to 9.6.0.5 9.5.1.10

The fix was applied to DotNetPlatform class by switch around the Classloader to use the thisClass instead of the ClassLoader from the current thread.

Please register to edit this issue

Also available in: Atom PDF