Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return total number of available assets #688

Closed
5 of 7 tasks
startailcoon opened this issue Feb 24, 2018 · 7 comments
Closed
5 of 7 tasks

Return total number of available assets #688

startailcoon opened this issue Feb 24, 2018 · 7 comments

Comments

@startailcoon
Copy link

startailcoon commented Feb 24, 2018

The UI has an issue, bitshares/bitshares-ui#1070, related to loading assets over a slow connection.

I have not been able to find a call that can accommodate the need for this directly. If I've overlooked something, please let me know.

Issue

When a user is navigating to the assets section of the UI, the app uses the API Call graphene::app::database_api::list_assets by loading 100 assets at the time from A -> Z until it reaches the end of all available assets.

When a user has a slow connection, this will take longer time and during this time the user can't find an yet to load asset.

For the time, we can rely on a cached maximum between sessions as a workaround, but the initial loading will never know how many assets there are until they are all loaded.

Requested Feature

An API call that can return the total number of assets available so we can know when this loading is completed.

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Design / Develop Solution
    • Issue estimation: 0.5 hours
    • Issue assigned to @nanomobile
  • Perform QA/Testing
  • Update Documentation
@abitmore
Copy link
Member

@startailcoon although returning the total number of assets is not hard, I think it's better that the UI don't try to load all assets if only for the "search" feature. That said, sooner or later we'll be unable or unpractical to fetch all assets, so we need to find a better implementation for the search feature, and likely need to change UX.

I will leave this issue open so far, looking forward to more discussion. But don't just do it.

@startailcoon
Copy link
Author

startailcoon commented Feb 24, 2018

The UI currently does this since before, which is why it takes so long for users to search for assets.
I agree that this is not a good way to do it, and so far I've only added a loading indicator as users, myself included, had issues during peak time.

A better way should be implemented to the UI.

@abitmore
Copy link
Member

Anyway, adding a get_asset_count API won't harm.

@abitmore abitmore added this to the Future Non-Consensus-Changing Release milestone Feb 25, 2018
@oxarbitrage
Copy link
Member

es_objects plugin(#500) stores an index with all the assets created. now the wallet is starting to use elasticsearch plugin for operations they can go forward with the objects database and pull additional data like assets faster and with richer queries.

@nanomobile
Copy link
Contributor

I want to claim this issue @oxarbitrage @abitmore @ryanRfox is it possible ? Thanks !

cogutvalera pushed a commit to cogutvalera/bitshares-core that referenced this issue Jul 21, 2018
@cogutvalera
Copy link
Member

PR is ready

oxarbitrage added a commit that referenced this issue Jul 21, 2018
fixed issue #688, add get_asset_count API
@oxarbitrage
Copy link
Member

added new api call for this get_asset_count to the database_api at #1159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants