Select to view content in your preferred language

FeatureTable.addFeatures() does not complete (sometimes)

385
2
Jump to solution
11-02-2023 06:42 AM
frankm
by
Occasional Contributor

Hi, I am observing something unexpected with an app here. When I add features, sometimes, the addFeatures does not call onSuccess or onFailure, nor does it throw. I was wondering if maybe there is some way to detect what is going on?

basically I get my featureTable and call addFeatures with a List<Feature>, no magic there.

I am not seeing this on small amounts of features but it happens too often on lists sized 9000+. Is there a limit I should be aware of, should I split and perform the operations on chunks of 500 instead or something like that?

0 Kudos
1 Solution

Accepted Solutions
frankm
by
Occasional Contributor

Apparently, it seems to be stable when reducing the size of chunks to 250, so far.

So if anyone does custom hard sync, as in: deletion of features followed by large amounts of features passed to addFeatures, maybe this will help. Chunk it up.

Correction: It happens still. I will test more, if anyone knows of limitations, it would be great. I am doing deletion before the addFeatures so maybe I am too quick here. Will update.

I believe the issue is not related to the SDK at all, which might not come as a shock. I now think it is a good old async related issue.

View solution in original post

0 Kudos
2 Replies
frankm
by
Occasional Contributor

Tried with chunking features into blocks of 500, but still seeing the issue. Even tried with a delay after each pass. Im doing beginTransaction before the whole operation and commit if everything went ok, if I detect an error I call rollbackTransaction. Which doesn't help since it seems to get stuck somewhere - sometimes.

0 Kudos
frankm
by
Occasional Contributor

Apparently, it seems to be stable when reducing the size of chunks to 250, so far.

So if anyone does custom hard sync, as in: deletion of features followed by large amounts of features passed to addFeatures, maybe this will help. Chunk it up.

Correction: It happens still. I will test more, if anyone knows of limitations, it would be great. I am doing deletion before the addFeatures so maybe I am too quick here. Will update.

I believe the issue is not related to the SDK at all, which might not come as a shock. I now think it is a good old async related issue.

0 Kudos