Skip to content

Optimize iteration in asset_update_bitasset_evaluator #960

@abitmore

Description

@abitmore

As described in #932 (comment),

For better performance, we can add a "by_backing_asset" index for asset_bitasset_data_object so can iterate through it here, rather then iterating through all bitAssets.

Related code is:

// loop through all assets that have this asset as a backing asset
const auto& idx = d.get_index_type<asset_index>().indices().get<by_type>();
for( auto itr = idx.lower_bound(true); itr != idx.end(); ++itr )
{
const auto& child = *itr;
if ( child.bitasset_data(d).options.short_backing_asset == op.asset_to_update )
{

Metadata

Metadata

Assignees

Labels

1b User StoryThe User Story details a requirement. It may reference a parent Epic. It may reference child Task(s)2g Final ReviewStatus indicating the solution passes the test case(s) and is being reviewed for final acceptance.performance

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions