This is just a post for the benefit to whom is experiencing the full GC issue caused by embedding images in docx.
public static BinaryPartAbstractImage createImagePart(
OpcPackage opcPackage,
Part sourcePart, byte bytes)
...
explicitly invokded System.gc() which caused high CPU load and performance issue. To avoid high CPU load/frequent full GC, better to use
public static BinaryPartAbstractImage createImagePart(
OpcPackage opcPackage,
Part sourcePart, File imageFile)