agentm / agentm/project-m36

Performance of executeDatabaseContextExpr

Aberta
#210 6 comentários 2 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Haskell
Estrelas
952
Forks
50
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

For context, I'm currently assessing whether I can use project-m36 as the persistence layer for a web application (I'm hoping that I will be able to!).

I'm currently struggling with the performance of `executeDatabaseContextExpr`. My test case runs using the `NoPersistence` strategy (so nothing is being written to the file system or anything).

My test first inserts 100k records in one big batch and then tries inserting records one by one. The simplest case defines no constraints on the data at all. The second case defines just a single unique key (inclusion dependency) for the relvar.

No constraints single insert: ~1s
Single unique key inclusion dependency: ~7s

My target response time to POST requests for a web app would be something like 200ms total, so at the moment, even without any constraints, and only a single relvar, the performance is an order of magnitude away from usability. If scaled up to the context of a full application model (say 20 relvars, each with 10k-1m records, with multiple unique and foreign key constraints) then presumably I'd be looking at insert times of around 60-300s.

I understand that a new persistence layer with constant time transaction commits is in the works, which is definitely necessary, but if anything `executeDatabaseContextExpr` seems to be a much bigger performance problem.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.