[ENHANCEMENT]: cache counts

Aperta
#2,281 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
php, sql
Ambito
backend, databases

Direzione di ricerca

Start by comparing the proposed caching and asynchronous-pagination approaches with the indexing option discussed in issue #2289. The issue does not settle which approach to implement or identify files and tests; clarify the scope first, then define completion in terms of reducing the pagination-count bottleneck without changing pagination results.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement server
Description

It would be nice if there is some functionality to cache the pagination count data because if you got a lot of data, the count(*) that the db will do in the backend becomes a bottleneck, an example could be when you have a lot of cracks. We could perhaps store this in a seperate table or even a redis store.

Another solution could because this will probably only be a problem for the cracks table in most systems, since that is the only kind of data that has no archived functionality, is to keep the total amount of cracks in some metadata table, and whenever something gets cracked, this element gets updated

The problem with this approach you would have to have a count for every combination of access groups which can become unreasonable.

Another solution which is my favorite but would need to have changes in both the frontend as backend. Is to make a seperate pagination endpoint that returns the pagination data which can be called in async with the normal endpoint. This way counting will not be a bottleneck for retrieving the data.

In the end this might not be that high of prio, especially since it can be solved pretty good by creating the correct indexes: https://github.com/hashtopolis/server/issues/2289

Lingua principale
PHP
Stelle
1.8k
Fork
257
Merge medio
1g 13h
PR unite (30g)
15

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hashtopolis/server

Tutte le issue di hashtopolis/server

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.