signum-network / signum-explorer

Signum Blockchain Explorer
GNU General Public License v3.0
9 stars 11 forks source link

Long Loading Times for initial page #135

Closed ohager closed 1 year ago

ohager commented 1 year ago

I perceive massive loading times 15+ (fifteen!) seconds until the home page is being rendered... This should - iff possible - be improved.

Because of the long loading times I even checked my internet connection, just to see that it's not on my side. ;)

gittrekt commented 1 year ago

I perceive massive loading times 15+ (fifteen!) seconds until the home page is being rendered... This should - iff possible - be improved.

Because of the long loading times I even checked my internet connection, just to see that it's not on my side. ;)

Have you tried adding these to your database these entries? It should be added to the node database.

CREATE INDEX transaction_height_timestamp ON transaction(height, timestamp);

CREATE INDEX asset_height ON asset(height);

frankTheTank72 commented 1 year ago

I perceive massive loading times 15+ (fifteen!) seconds until the home page is being rendered... This should - iff possible - be improved. Because of the long loading times I even checked my internet connection, just to see that it's not on my side. ;)

Have you tried adding these to your database these entries? It should be added to the node database.

CREATE INDEX transaction_height_timestamp ON transaction(height, timestamp);

CREATE INDEX asset_height ON asset(height);

Yes both indicies already exists on the DB

frankTheTank72 commented 1 year ago

@pir8radio do you have also sometimes those long loading times ? On https://chain.signum.network/ sometimes loading is slow - but most of the time it is super fast

pir8radio commented 1 year ago

i do on my testnet but not my mainnet. both are ubuntu VM's Both use networked maria DB's (db server is its own server not local) both basically have unlimited ram (cache) so im not sure why one sees this issue and one does not. We probably need to dig deeper. I need to see if DB keys match.

pir8radio commented 1 year ago

This should be fixed in this pr: https://github.com/signum-network/signum-explorer/pull/136 pre-cache the total supply query. it was counting every wallet then summing the wallet total and ignoring the burn account, to come up with the total supply.. This now runs as a timed task so users do not see a delay.

ohager commented 1 year ago

yeah, checked it.... loading time is somewhere between 1 and 3 secs.... can be latency here. Good Job