forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce App.StringHasher and StringID
Split Document::mapStringIDs function into StringHasher StringHasher function as a persistent string hash/indexer. It stores the string into a internal map, and index the string with an incremental integer ID. The ID is returned as a reference counted object StringID. By default StringHasher only persists used strings. Strings longer than a configurable length threshold will be internally hashed with SHA1 and original text discarded. Both StringHasher and StringID are exposed to Python. Document object has a default hasher object. Other property can easily embed their own string hasher.
- Loading branch information
1 parent
2ddd4b4
commit e057cc1
Showing
12 changed files
with
801 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.