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

TRCL-2812 optimization #49

Closed
wants to merge 5 commits into from
Closed

Conversation

johnqh
Copy link
Contributor

@johnqh johnqh commented Sep 29, 2023

Some significant optimization.

  1. Use marketInfo optional param
  2. Use currentHeight optional param
  3. Parallelize retrieving market info (getting from indexer or marketInfo param), getting current block height (query onchain, or from currentHeight param), getting account (used cached info for SHORT_TERM, or query onchain)

So for SHORT_TERM orders, there should be no more round trips before sending the transaction. Otherwise, it will still query onchain for account info, or retrieving market info/query block/query account in parallel.

I am sure my TS syntax is not the best. I would like to see some detailed review, and/or integrated testing with iOS/web.

# Conflicts:
#	v4-client-js/__native__/__ios__/v4-native-client.js
#	v4-client-js/__native__/__ios__/v4-native-client.js.map
#	v4-client-js/package.json
@johnqh
Copy link
Contributor Author

johnqh commented Oct 4, 2023

Needs more testing

@johnqh johnqh closed this Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant