Allow to load dictionaries form a rcc
AbandonedPublic

Authored by vonreth on Apr 17 2018, 3:34 PM.

Details

Reviewers
mlaurent
Summary

This massively reduces the installation size of an application on Windows.

The rcc is 50mb while the uncompressed files are 150mb.

Diff Detail

Repository
R246 Sonnet
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
vonreth created this revision.Apr 17 2018, 3:34 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 17 2018, 3:34 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
vonreth requested review of this revision.Apr 17 2018, 3:34 PM
vonreth edited the summary of this revision. (Show Details)Apr 17 2018, 3:38 PM
mlaurent accepted this revision.Apr 17 2018, 3:45 PM

Remove indent and commit it :)
Thanks

src/plugins/hunspell/hunspellclient.cpp
104

fix indent

This revision is now accepted and ready to land.Apr 17 2018, 3:45 PM
vonreth updated this revision to Diff 32441.Apr 18 2018, 6:15 AM

Changed the lookup location for the rcc

vonreth edited the summary of this revision. (Show Details)Apr 18 2018, 6:18 AM

Turns out that my test was a bit too small.
While sonnet finds the dicts and marked my random typed stuff as wrong it also marks everything as wrong.

Sonnet might have no problems with the rcc but hunspell has.

Hunspell(const char* affpath, const char* dpath, const char* key = NULL);

The constructor only takes a file path and creates an invalid speller if the file does not exist.

So I guess I'm going to abandon the review....

vonreth updated this revision to Diff 32445.Apr 18 2018, 7:30 AM

Write resources to tmpDir before passing them to hunspell

mlaurent added inline comments.Apr 18 2018, 4:01 PM
src/plugins/hunspell/hunspelldict.cpp
104

not necessary to check pointer here.

While the disk use of the installation goes down the ram usage explodes as QResource doesn't use mmap https://github.com/qt/qtbase/blob/a37dd93defd91b79fb6730d0ff0515a66a0d3972/src/corelib/io/qresource.cpp#L1037

While the disk use of the installation goes down the ram usage explodes as QResource doesn't use mmap https://github.com/qt/qtbase/blob/a37dd93defd91b79fb6730d0ff0515a66a0d3972/src/corelib/io/qresource.cpp#L1037

Would adding a mmap implementation on Windows like https://github.com/witwall/mman-win32 be an option ?

Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptOct 29 2019, 10:29 AM
ahmadsamir added a subscriber: ahmadsamir.EditedOct 29 2019, 2:50 PM

IINM, in the commit message s/form a rcc/from an rcc/.

Edit: (I hope this ^ didn't sound snobby, it's really not at all).

vonreth abandoned this revision.Feb 13 2020, 10:20 AM

as we now have a native windows backend there is no point in this