We are using Aspose.Cells for Node.js via Java in a Kubernetes environment with a 1GB memory limit per pod.
Our dataset size is huge, and we need to support dynamic sorting (single/multi-column).
We would like clarification on the following:
- Is there any way to define sorting metadata without physically sorting the data server-side (i.e., deferred sorting applied when the user opens the file)?
We are concerned about memory spikes and OOM issues when using DataSorter.sort() on large datasets.
We would appreciate guidance on the recommended architecture for large-scale exports.
Thank you.
@KarthikMunjam
Thanks for the report. I have not confirmed this yet and can only confirm it after reproducing on our side. I need a bit more information to answer precisely for Aspose.Cells.
- Which version of Aspose.Cells for Node.js via Java are you currently using?
- What file format are you generating (e.g., XLSX, CSV, ODS) and does the target application need to apply the sort automatically when opened?
- Are you open to using features such as AutoFilter or custom XML parts to store sort criteria instead of performing an in‑memory
DataSorter.sort()?
A support engineer will review your answers and follow up in this thread.
Once I have the missing details, I’ll try to reproduce this. If I can confirm it, I’ll log it internally and follow up here.
A support engineer will follow up in this thread if needed.
am asking ??
Is there any way to define sorting metadata without physically sorting the data server-side (i.e., deferred sorting applied when the user opens the file)?
@KarthikMunjam
For the sorting process, the most memory‑intensive and time‑consuming part is not determining the order of rows/columns, but moving and swapping rows/columns according to the sorted order. Therefore, even if sorting metadata is provided, it probably won’t help much with memory consumption.
For memory limited environment, you may try LoadOptions.MemorySetting option which may help to decrease the memory cost for common situations. However, please note the downside of using the memory mode. For sorting rows/columns, the process of moving/shifting rows/columns may increase the time cost significantly for large dataset. Here the document about this option provides more details for your reference: Optimizing Memory Usage while Working with Big Files having Large Datasets|Documentation
Anyways, if you can provide an example to show your case, we may investigate it to see whether we can help to improve the performance.