Tony Asleson
2014-03-24 21:27:58 UTC
Gris has brought this up a couple of times. The fact that the majority
of the API passes objects instead of object IDs to functions/methods.
In normal operation this doesn't seem to be much of an issue. However,
today I did some simulated testing with 50K volumes. When listing them
all it takes about ~25 seconds. When you delete one of them from the
command line it takes about 22 seconds. When using the library it's
instant as you already have the object to use. This to me is the main
disadvantage. The command line retrieves all the objects of the given
type, makes sure that the one you passed is present and then uses the
object to perform the operation.
If we switched this to just using the IDs then we would pass it to the
plug-in and let it look the object up and perform the operation. Either
that or we would need to add to the API, to retrieve the information
about a specific object using its ID.
The main benefit would be for CLI users as library users won't see much
difference.
Thoughts/Comments?
Regards,
Tony
of the API passes objects instead of object IDs to functions/methods.
In normal operation this doesn't seem to be much of an issue. However,
today I did some simulated testing with 50K volumes. When listing them
all it takes about ~25 seconds. When you delete one of them from the
command line it takes about 22 seconds. When using the library it's
instant as you already have the object to use. This to me is the main
disadvantage. The command line retrieves all the objects of the given
type, makes sure that the one you passed is present and then uses the
object to perform the operation.
If we switched this to just using the IDs then we would pass it to the
plug-in and let it look the object up and perform the operation. Either
that or we would need to add to the API, to retrieve the information
about a specific object using its ID.
The main benefit would be for CLI users as library users won't see much
difference.
Thoughts/Comments?
Regards,
Tony