Skip to content

Conversation

@joshua-software-dev
Copy link

When trying to retrieve a large number of large records, mono-wasm seems to choke on returns from IndexedDbManager.GetRecords. In my particular use case, it broke at around 300 records, and when I had 10000 records I needed to retrieve, this was a major blocker for me.

I have added two functions:

  1. Task<List> IndexedDbManager.GetRecords(string storeName, uint limit, uint offset = 0)

The parameter limit does what it says on the tin, limit the amount of records returned, and offset chooses how far to offset into the retrieved records before returning results. This version is an alternative to the regular GetRecords function, which remains as is.

  1. Task IndexedDbManager.GetRecordsCount(string storeName)

This function provides a count of the number of records that are in a store without having to spend time serializing them to determine this. When dealing with a lot of records, using this paginated return to retrieve the results works, but is somewhat slow, and memory intensive when all I need is the count. This function alleviates this particular concern.

Tests of these new functions have been added to the test blazor page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant