Opened 3 years ago

Last modified 4 months ago

#5138 closed change

[emscripten] Convert serializing patterns.ini to C++ — at Initial Version

Reported by: trev Assignee: trev
Priority: P2 Milestone:
Module: Core Keywords: closed-in-favor-of-gitlab
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Background

See #4122 for the rationale. We should serialize patterns.ini in C++ for better performance.

What to change

Create compiled/storage/serializer.cpp providing a Serializer class (should be exposed to JavaScript as _FilterStorage_Serializer). The parser should allocate a 64kB (?) buffer, with the pointer to the buffer being returned by its buffer property. FilterStorage.exportData (JavaScript, located in lib/filterStorage.js) should create a serializer instance and call Serializer.continue() until it returns 0 (no more data). Serializer.continue() should write output lines into the buffer (followed by newline character) until there is no more space and return the number of characters written. FilterStorage.exportData should then extract the lines and yield them.

Change History (0)

Note: See TracTickets for help on using tickets.