apache / apache/couchdb

Cache VDU functions so they are not called for each document

Open
#4,612 1 comment 0 reactions 0 assignees View on GitHub
enhancement needs-triage
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

[NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )

## Summary

When adding 100 documents, CouchDB sends the VDU functions for each and every document (meaning that the VDU functions are sent 100 times). This leads to poor performances.

[NOTE]: # ( Provide a brief overview of what the new feature is all about. )

## Desired Behaviour

[NOTE]: # ( Tell us how the new feature should work. Be specific. )
[TIP]: # ( Do NOT give us access or passwords to your actual CouchDB! )
A better implementation would be to cache the VDU functions so they are not sent as often to the JS engine

## Possible Solution

[NOTE]: # ( Not required. Suggest how to implement the addition or change. )
Caching the functions or at least calling them only once per DB call.

## Additional context

[TIP]: # ( Why does this feature matter to you? What unique circumstances do you have? )

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating CouchDB's VDU handling and tracing how functions are sent during multi-document requests; determine whether caching per request or per database call matches the existing behavior. Done means VDU functions are not sent once per document and coverage or measurements verify the reduced calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang, javascript
Domain
databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.