WordPressReader (Standard) version 1.2.0 focuses on improving performance
The update contains several improvements to the HttpClient
implementation, which should improve performance of the library a lot:
- all handlers now use one static
HttpClient
instance.HttpClient
is built to use it that way, and there is also no problem with multiple request handled by that instance. So everyone should use it in that way - the library is now actively enforcing gzip/deflate compression to make responses faster, especially when requesting bigger lists of items (if you want do deactivate it on the managed implementation, pass in
false
with the newuseCompression
parameter with your call to theSetupClient
method - deserialization by default now happens directly from the
HttpResponse
stream instead of first converting it to a string - added an API to pass in your own
HttpClient
instance instead of the managed one (you could even use one static instance for your whole app this way to improve performance even further). To do so, just use the newly added methodSetCustomClient(HttpClient client)
on your handler instances.
I made this changes working without breaking existing implementations. Just by updating the library, you will get a better performance.
I also updated the source code on GitHub. If you just want to update the library, the update is already available on NuGet.
Happy coding, everyone!
P.S.
If you want to see the library in a live app, you can download my official blog reader app (which is written around it as a Xamarin.Forms
app) here:
This post is licensed under CC BY 4.0 by the author.