Description:
When using AddPicture or AddPictureAsync in EPPlus, the method generates a significant amount of Large Object Heap (LOH) memory, which can lead to performance issues, especially in web applications where efficient memory usage is critical.
Proposed Solution:
Introduce a new feature to allow images to be added to Excel files by reference, rather than embedding them directly into the file. This can be achieved by enabling the ability to add images using a relative path without the need for existence checks.
Benefits:
Reduced Memory Usage: By referencing images instead of embedding them, the LOH memory consumption will be minimized, enhancing performance.
Improved Performance: Especially beneficial for web applications that generate Excel reports, as it will reduce the memory footprint and improve response times.
Simplified Workflow: Allowing images to be added by relative paths without existence checks simplifies the process and reduces the overhead involved in validating image files.
Detailed Requirements:
Add by Reference: Provide an option in the AddPicture and AddPictureAsync methods to add images by reference.
Relative Path Support: Enable the functionality to add images using relative paths without the necessity of checking if the file exists.
Example Usage:
// Adding image by reference with a relative path
worksheet.Drawings.AddPictureByReference("MyImage", "images/logo.png");
Description:
When using
AddPicture
orAddPictureAsync
in EPPlus, the method generates a significant amount of Large Object Heap (LOH) memory, which can lead to performance issues, especially in web applications where efficient memory usage is critical.Proposed Solution:
Introduce a new feature to allow images to be added to Excel files by reference, rather than embedding them directly into the file. This can be achieved by enabling the ability to add images using a relative path without the need for existence checks.
Benefits:
Detailed Requirements:
AddPicture
andAddPictureAsync
methods to add images by reference.Example Usage: