JBWAPI icon indicating copy to clipboard operation
JBWAPI copied to clipboard

Reduce Async FrameBuffer memory usage

Open JasperGeurtz opened this issue 1 year ago • 0 comments

Currently and optimization exists to only copy over the dynamic game information: https://github.com/JavaBWAPI/JBWAPI/blob/f854bcfe3bb0616d05482d9fa114680afd1273e5/src/main/java/bwapi/FrameBuffer.java#L182

However we still allocate a full (33MB) buffer of which we only use parts because of that optimization. This can be reduced by pointing calls to the static information to the "main" buffer and only allocating as much as needed for the dynamic information (which is only 4-5MB).

JasperGeurtz avatar Oct 20 '24 08:10 JasperGeurtz