Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow pulling from multiple worksheets #89

Closed
vietle-bh opened this issue Feb 6, 2025 · 2 comments · Fixed by #90
Closed

Slow pulling from multiple worksheets #89

vietle-bh opened this issue Feb 6, 2025 · 2 comments · Fixed by #90
Labels
type:question Ask for further details or start conversation

Comments

@vietle-bh
Copy link
Contributor

Hi @adecler , @IsakNaslundBh 👋 does the adapter reopen the Excel file every time it pulls data from a worksheet?

I'm pulling data from 20 sheets in a 1-MB Excel file and it takes like 10 minutes!

CellValuesRequest request = new CellValuesRequest { Worksheet = sheetName };
IEnumerable<object> data = adapter.Pull(request);
List<TableRow> rows = data.Cast<TableRow>().ToList();

The code spent most of its time on the Pull. This appeared on every loop iteration:

Image

I would appreciate any suggestion! 😃

@vietle-bh vietle-bh added the type:question Ask for further details or start conversation label Feb 6, 2025
@adecler
Copy link
Member

adecler commented Feb 6, 2025

@vietle-bh , yes it reopen the file every time. This is necessary to guarantee that the adapter is grabbing the latest content of the file (say, when you're pulling from a file that is currently open in Excel).

That being said, the problem is easily solved by adding a BatchRequest object. We already implemented the PushItem that enable batch processing for the Push, we just never got to do the same for the Pull.

@vietle-bh
Copy link
Contributor Author

Thanks @adecler ! I'll check if I can add BatchRequest for the Pull 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Ask for further details or start conversation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants