flutter_wordpress icon indicating copy to clipboard operation
flutter_wordpress copied to clipboard

Slow loading times due too lack of parralel backend calls

Open BarrelLive opened this issue 4 years ago • 1 comments

Hi all,

first of all thank you for this fine plugin.

Is it possible to have non-blocking operations within the "Future<Post> _postBuilder".

For instance, if I want to get an author, comments + featuremedia according to the current implementation the postBuilder does this sequential, whereas it could do it parrallel without waiting for the response of the other operations.

An in the end it could wait for all other fetchOperations to join the final result?

Cheers,

BarrelLive avatar Mar 16 '20 14:03 BarrelLive

postBuilder is a nasty recursive function and I don't think it's good for any WordPress user who has a limit on their server as this function can generate as many http requests as it wants and its bad for concurrency (it can get to the hundreds of requests very easily). One solution might be creating a custom API endpoint with that data filtered.

ellie-me avatar Jul 17 '20 15:07 ellie-me