You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current stake contract's method get_provisioners is a performance bottleneck, as its processing time grows linearly with the number of provisioners. According to measurements, the following data illustrates the problem:
number of provisioners: processing time:
60......................................228.988ms
600....................................2.300383s
1000...................................3.648217s
10000.................................33.811937s
get provisioners becomes a performance bottleneck and needs to be improved
Possible solution design or implementation
Easy optimisation brings significant improvements. We should keep PublicKey in our data structure rather than convert the bytes stored into a PublicKey every time get_provisioners is called. Such change gives the following results:
number of provisioners: processing time:
1000..................................0.002s
10000................................0.012s
Additional context
Since the change is in the stake contract, we need to plan for migration of the stake contract in order to enforce the above optimisation.
The text was updated successfully, but these errors were encountered:
Summary
Current stake contract's method
get_provisioners
is a performance bottleneck, as its processing time grows linearly with the number of provisioners. According to measurements, the following data illustrates the problem:number of provisioners: processing time:
60......................................228.988ms
600....................................2.300383s
1000...................................3.648217s
10000.................................33.811937s
get provisioners becomes a performance bottleneck and needs to be improved
Possible solution design or implementation
Easy optimisation brings significant improvements. We should keep PublicKey in our data structure rather than convert the bytes stored into a PublicKey every time get_provisioners is called. Such change gives the following results:
number of provisioners: processing time:
1000..................................0.002s
10000................................0.012s
Additional context
Since the change is in the stake contract, we need to plan for migration of the stake contract in order to enforce the above optimisation.
The text was updated successfully, but these errors were encountered: