Opened 3 years ago

Closed 8 weeks ago

Last modified 2 weeks ago

#5138 closed change (rejected)

[emscripten] Convert serializing patterns.ini to C++

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

Description (last modified by trev)

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.

Notes

  • The Serializer class should make a copy of the current subscriptions list when created, to avoid bogus output if something changes during export.
  • Methods FilterStorage.saveToDisk() and FilterStorage.getBackupFiles() can stay in JavaScript, without any changes.

Change History (6)

comment:1 Changed 3 years ago by trev

  • Description modified (diff)

comment:2 Changed 3 years ago by trev

  • Blocked By 5137 added
  • Blocking 4122 added
  • Description modified (diff)

comment:3 Changed 3 years ago by trev

  • Owner trev deleted

comment:4 Changed 2 years ago by sergz

  • Owner set to sergz

comment:5 Changed 8 weeks ago by nps1337

spam

Last edited 2 weeks ago by kzar (previous) (diff)

comment:6 Changed 8 weeks ago by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from new to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Note: See TracTickets for help on using tickets.