SerializedMessageIndex Class Reference

Storage on serialized file. More...

Inheritance diagram for SerializedMessageIndex:
Inheritance graph
[legend]
Collaboration diagram for SerializedMessageIndex:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 retrieve ()

Protected Member Functions

 store (array $array)

Protected Attributes

 $index
 $filename = 'translate_messageindex.ser'

Detailed Description

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 264 of file MessageIndex.php.


Member Function Documentation

SerializedMessageIndex::retrieve (  ) 
Returns:
array

Reimplemented from MessageIndex.

Definition at line 271 of file MessageIndex.php.

Here is the call graph for this function:

SerializedMessageIndex::store ( array $  array  )  [protected]

Reimplemented from MessageIndex.

Reimplemented in TestableSerializedMessageIndex.

Definition at line 288 of file MessageIndex.php.

Here is the call graph for this function:


Member Data Documentation

SerializedMessageIndex::$filename = 'translate_messageindex.ser' [protected]

Definition at line 268 of file MessageIndex.php.

SerializedMessageIndex::$index [protected]

Definition at line 266 of file MessageIndex.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:52 2013 for MediaWiki Translate Extension by  doxygen 1.6.3