Aspose Cells : Need input on performance improvements

We’re running the GridJS Aspose.Cells backend within a Docker container. The host machine has sufficient resources available—approximately 6GB of free memory and 80% free CPU. When attempting to load three spreadsheets in separate sessions (sizes: 2MB, 10MB, and 20MB), we observed the following behavior:

  • The 2MB file loaded successfully but took around 40 seconds, which seems unusually high.
  • The 10MB and 20MB files failed to load, returning a gateway timeout error after 1 minute.

We’d like to understand if there are any optimization strategies available to improve performance, especially for larger files. Additionally, does GridJS Aspose.Cells support scroll-based (progressive) loading for large spreadsheets?

@sarathepiq

Cause

The performance issues you’re experiencing with loading spreadsheets in your Docker container could be attributed to several factors, including the size of the files, the configuration of the Docker container, and the way the Aspose.Cells library processes these files. The gateway timeout errors indicate that the processing time exceeds the server’s timeout settings.

Solution

To improve performance, consider the following strategies:

  1. Optimize Docker Configuration: Ensure that your Docker container has sufficient resources allocated. Increase the memory limit or CPU shares as needed.

  2. Increase Timeout Settings: Adjust the timeout settings in your server configuration to allow for longer processing times, especially for larger files.

  3. Use Efficient File Formats: Convert your spreadsheets to a more efficient format that Aspose.Cells can process faster, if feasible.

  4. Load Files Asynchronously: Implement asynchronous loading of files to prevent blocking and enhance responsiveness.

  5. Progressive Loading: Utilize Aspose.Cells features that allow for progressive loading of large spreadsheets, enabling you to load only the visible parts initially to significantly reduce loading times.

Code

Here’s a simple example of how you might implement asynchronous loading in your application:

using Aspose.Cells;
using System.Threading.Tasks;

public async Task LoadSpreadsheetAsync(string filePath)
{
    return await Task.Run(() => 
    {
        Workbook workbook = new Workbook(filePath);
        // Additional processing...
    });
}

Next Steps

  1. Review your Docker resource allocation and adjust as necessary.
  2. Increase the timeout settings in your server configuration.
  3. Test loading files asynchronously to evaluate performance improvements.
  4. Explore the possibility of progressive loading if your application supports it.

Please implement these strategies and let me know if you see an improvement in performance!

@sarathepiq,

The issue might be related to configuration of the docker on your end. Do you get the issue only on docker container when loading the file into Aspose.Cells.GridJs control and it works fine on other environments? Anyways, could you please share sample Excel file (you may zip the file prior attaching here) and will check your issue soon.