[Qemu-devel] [PATCH v2] Add interface to traverse the qmp command list by QmpCommand

2013-10-08 Thread Mark Wu
In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of commands. This patch adds an interface to

Re: [Qemu-devel] [PATCH v2] Add interface to traverse the qmp command list by QmpCommand

2013-10-08 Thread Eric Blake
On 10/08/2013 12:23 AM, Mark Wu wrote: In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of

Re: [Qemu-devel] [PATCH v2] Add interface to traverse the qmp command list by QmpCommand

2013-10-08 Thread Michael Roth
Quoting Mark Wu (2013-10-08 01:23:09) In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of