Skip to content

Commit

Permalink
HF 30 - Profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Sep 4, 2024
1 parent be4e832 commit e47e553
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/redux/FetchDataSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function* fetchState(location_change_action) {

const posting = yield select(state => state.user.getIn(['current', 'private_keys', 'posting_private']))

console.time('prof: getContactsAsync')
const con = yield call([auth, 'withNodeLogin'], { account, keys: { posting },
call: async (loginData) => {
return await api.getContactsAsync({
Expand All @@ -73,6 +74,7 @@ export function* fetchState(location_change_action) {
//alert(JSON.stringify(con))
state.contacts = con.contacts
if (hasErr) return
console.timeEnd('prof: getContactsAsync')

const path = parts[1]
if (path) {
Expand All @@ -87,6 +89,7 @@ export function* fetchState(location_change_action) {
state.messages_update = state.messages[state.messages.length - 1].nonce;
}
} else {
console.time('prof: getGroupsAsync')
let the_group = yield callSafe(state, [], 'getGroupsAsync', [api, api.getGroupsAsync], {
start_group: path,
limit: 1,
Expand All @@ -101,7 +104,9 @@ export function* fetchState(location_change_action) {
the_group = null
}
state.the_group = the_group
console.timeEnd('prof: getGroupsAsync')

console.time('prof: getThreadAsync')
let query = {
group: path,
}
Expand All @@ -127,6 +132,7 @@ export function* fetchState(location_change_action) {
state.messages_update = state.messages[state.messages.length - 1].nonce;
}
}
console.timeEnd('prof: getThreadAsync')
}
}
for (let contact of state.contacts) {
Expand Down

0 comments on commit e47e553

Please sign in to comment.