Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
perf(ui): tweaking activity pagesize
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Oct 10, 2020
1 parent e2ca600 commit edcaf6a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ module.exports = {

// activity list related settings
activity: {
pageSize: 50, // Number of items per one fetch
pageSize: 250, // Number of items per one fetch
},

backup: {
Expand Down
6 changes: 3 additions & 3 deletions renderer/reducers/activity/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ export const createActivityPaginator = () => {
}

const fetchTransactions = async (pageSize, offset, blockHeight) => {
// Lets load 50x more bloks than page size is set to since blocks only cover a 10 minute period.
// with a 50 item page size, that would mean loading transactions in chunks of about 15 days.
const vPageSize = pageSize * 50
// Lets load 10x more bloks than page size is set to since blocks only cover a 10 minute period.
// with a 250 item page size, that would mean loading transactions in chunks of about 20 days.
const vPageSize = pageSize * 10
const firstStart = blockHeight - vPageSize

// Determine end height.
Expand Down
2 changes: 1 addition & 1 deletion renderer/reducers/invoice/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { convert } from '@zap/utils/btc'
*/

/**
* @typedef {Object} Decoration Invoice decorated with additional useful properties.
* @typedef {object} Decoration Invoice decorated with additional useful properties.
* @property {'invoice'} type Activity type
* @property {number} expiryDate Expiry date
* @property {boolean} isExpired Boolean indicating if the invoice is expired
Expand Down
2 changes: 1 addition & 1 deletion renderer/reducers/transaction/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CoinBig } from '@zap/utils/coin'
*/

/**
* @typedef {Object} Decoration Transaction decorated with additional useful properties.
* @typedef {object} Decoration Transaction decorated with additional useful properties.
* @property {'transaction'} type Activity type
* @property {boolean} isReceived Boolean indicating if transaction is incoming
* @property {boolean} isSent Boolean indicating if transaction is outgoing
Expand Down

0 comments on commit edcaf6a

Please sign in to comment.