ProtonMail / ProtonMail/libsieve-php

Add a proper way of resetting the registry.

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
25
Forks
9
Avg merge
6m
Merged PRs (30d)
3

Description

We need to reset the sieve registry between every parses.

It was done in 197c174 by recreating an instance of SieveRegistry. It takes in average 1,26847 ms, which is not high, but it can be optimized easily, by caching the content of the xml files inside the SieveRegistry constructor.

Contributor guide

Open the contributing guide

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 by reading the SieveRegistry implementation and commit 197c174, then trace how the registry is recreated between parses. Define a reset approach that avoids rebuilding the instance while retaining the proposed XML-content caching, and verify that repeated parses produce the same results without unnecessary work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.