Storage on serialized file. More...
Public Member Functions | |
retrieve (bool $readLatest=false) | |
store (array $array, array $diff) | |
Public Member Functions inherited from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore | |
get (string $key) | |
getKeys () | |
Additional Inherited Members | |
Protected Member Functions inherited from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore | |
serialize ( $data) | |
These are probably slower than serialize and unserialize, but they are more space efficient because we only need strings and arrays. | |
unserialize ( $data) | |
Storage on serialized file.
This serializes the whole array. Because this format can preserve the values which are stored as references inside the array, this is the most space efficient storage method and fastest when you want the full index.
Unfortunately when the size of index grows to about 50000 items, even though it is only 3,5M on disk, it takes 35M when loaded into memory and the loading can take more than 0,5 seconds. Because usually we need to look up only few keys, it is better to use another backend which provides random access - this backend doesn't support that.
Definition at line 22 of file SerializedMessageIndex.php.
MediaWiki\Extension\Translate\MessageLoading\SerializedMessageIndex::retrieve | ( | bool | $readLatest = false | ) |
Reimplemented from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore.
Definition at line 26 of file SerializedMessageIndex.php.
MediaWiki\Extension\Translate\MessageLoading\SerializedMessageIndex::store | ( | array | $array, |
array | $diff ) |
Reimplemented from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore.
Definition at line 41 of file SerializedMessageIndex.php.