[Freeipa-devel] [PATCH 0112-7] Speeding up cli help

David Kupka dkupka at redhat.com
Wed Jul 20 12:32:14 UTC 2016


On 15/07/16 12:53, David Kupka wrote:
> Hello!
>
> After Honza introduced thin client that builds plugins and commands
> dynamically from schema client became much slower. This is only logical,
> instead of importing a module client now must fetch the schema from
> server, parse it and instantiate the commands using the data.
>
> First step to speed it up was addition of schema cache to client. That
> removed the RTT and download time of fetching schema every time.
>
> Now the most time consuming task became displaying help for lists of
> topics and command and displaying individual topics. This is simply
> because of the need to instantiate all the commands to find the
> relations between topics and commands.
>
> All the necessary bits for server commands and topics are already in the
> schema cache so we can skip this part and generate help from it, right?
> Not so fast!
>
> There are client plugins with commands and topics. So we can generate
> basic bits (list of all topics, list of all commands, list of commands
> for each topic) from schema and store it in cache. Then we need to go
> through all client plugins and get similar bits for client plugins. Then
> we can merge and print.
>
> Still the client response is not as fast as before and I this it even
> can't be. Also first time you display particular topic or list takes
> longer because it must be freshly generated and stored in cache for next
> use. And this is what the attached patches do.
>
> https://fedorahosted.org/freeipa/ticket/6048

Reimplemented so there is no need to distinguish client plugins and 
remote plugins.
The main idea of this approach is to avoid creating instances of the 
commands just to get the information about topic, name and summary 
needed for displaying help. Instead class properties are used to access 
the information directly in schema.

-- 
David Kupka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0112.1-schema-Read-data-from-cache-only-once.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0113.1-schema-Speed-up-cache-verification.patch
Type: text/x-patch
Size: 1945 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0114.1-schema-Generate-and-store-bits-for-help.patch
Type: text/x-patch
Size: 2669 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0115.1-schema-Introduce-format-versioning-for-api-schema-ca.patch
Type: text/x-patch
Size: 3718 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0116.1-frontend-Change-summary-topic-and-NO_CLI-to-class-pr.patch
Type: text/x-patch
Size: 8322 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-dkupka-0117.1-help-Do-not-create-instances-to-get-information-abou.patch
Type: text/x-patch
Size: 2499 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160720/2e71d014/attachment-0005.bin>


More information about the Freeipa-devel mailing list