openzim / openzim/node-libzim

Batch 'addArticle's

Open
#14 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
Dominant language
C++
Stars
36
Forks
14
Avg merge
9d 1h
Merged PRs (30d)
1

Description

The majority of CPU time in CPP (18.8%) when using node-libzim seems to be calls to v8::internal::Builtin_HandleApiCall.

I'm not sure how much it would improve the performance, but we could try creating an addArticles method in CPP and automatically batch the adding on the JS side.
This would keep the same simple API, but potentially improve performance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing addArticle binding and the JavaScript call path, using the reported v8::internal::Builtin_HandleApiCall CPU cost as context. Trace how articles are added across the C++ and JS sides before assessing the proposed addArticles entry point. Done means preserving the simple API while batching additions and verifying whether the change improves performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, node.js
Domain
backend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.