collections-cache 0.3.3.20250303__py3-none-any.whl → 0.3.4.20250303__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/METADATA +26 -12
- collections_cache-0.3.4.20250303.dist-info/RECORD +6 -0
- collections_cache-0.3.3.20250303.dist-info/RECORD +0 -6
- {collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/LICENSE +0 -0
- {collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/WHEEL +0 -0
{collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: collections-cache
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.4.20250303
|
4
4
|
Summary: collections-cache is a Python package for managing data collections across multiple SQLite databases. It allows efficient storage, retrieval, and updating of key-value pairs, supporting various data types serialized with pickle. The package uses parallel processing for fast access and manipulation of large collections.
|
5
5
|
License: MIT
|
6
6
|
Author: Luiz-Trindade
|
@@ -95,6 +95,31 @@ print(f"Inserted {len(cache.keys())} keys successfully!")
|
|
95
95
|
|
96
96
|
---
|
97
97
|
|
98
|
+
## Performance Benchmark 📊
|
99
|
+
|
100
|
+
After optimizing SQLite settings (including setting `synchronous = OFF`), the library has shown a significant performance improvement. The insertion performance has been accelerated dramatically, allowing for much faster data insertions and better scalability.
|
101
|
+
|
102
|
+
### Benchmark Results
|
103
|
+
|
104
|
+
For **100,000 insertions**:
|
105
|
+
|
106
|
+
- **Previous performance**: ~797 insertions per second.
|
107
|
+
- **Optimized performance**: **~6,657 insertions per second** after disabling SQLite's synchronization (`synchronous = OFF`), reducing the total insertion time from 125 seconds to **15.02 seconds**.
|
108
|
+
|
109
|
+
### Performance Scaling
|
110
|
+
|
111
|
+
With the optimized configuration, the library scales nearly linearly with the number of CPU cores. For example:
|
112
|
+
|
113
|
+
- **4 cores**: ~6,657 insertions per second.
|
114
|
+
- **8 cores**: ~13,300 insertions per second.
|
115
|
+
- **16 cores**: ~26,600 insertions per second.
|
116
|
+
- **32 cores**: ~53,200 insertions per second.
|
117
|
+
- **128 cores**: ~212,000 insertions per second (theoretically).
|
118
|
+
|
119
|
+
*Note: Actual performance may vary depending on system architecture, disk I/O, and specific workload, but benchmarks indicate a substantial increase in insertion rate as the number of CPU cores increases.*
|
120
|
+
|
121
|
+
---
|
122
|
+
|
98
123
|
## API Overview 📚
|
99
124
|
|
100
125
|
- **`set_key(key, value)`**: Stores a key–value pair. Updates the value if the key already exists.
|
@@ -106,17 +131,6 @@ print(f"Inserted {len(cache.keys())} keys successfully!")
|
|
106
131
|
|
107
132
|
---
|
108
133
|
|
109
|
-
## Performance Benchmark 📊
|
110
|
-
|
111
|
-
On a machine with 4 real CPU cores, benchmarks indicate around **781 insertions per second**. The library is designed to scale nearly linearly with the number of real cores. For example:
|
112
|
-
- **6 cores**: ~1,171 insertions per second.
|
113
|
-
- **16 cores**: ~3,125 insertions per second.
|
114
|
-
- **128 cores**: ~25,000 insertions per second (theoretically).
|
115
|
-
|
116
|
-
*Note: Actual performance will depend on disk I/O, SQLite contention, and system architecture.*
|
117
|
-
|
118
|
-
---
|
119
|
-
|
120
134
|
## Development & Contributing 👩💻👨💻
|
121
135
|
|
122
136
|
To contribute or run tests:
|
@@ -0,0 +1,6 @@
|
|
1
|
+
collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
|
2
|
+
collections_cache/collections_cache.py,sha256=IuHDhrQlCqX4oC3s7cwJ-spWI28O3uQ4_IZJtdUtLPE,6387
|
3
|
+
collections_cache-0.3.4.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
|
4
|
+
collections_cache-0.3.4.20250303.dist-info/METADATA,sha256=Vp2xY7SQ2E9wc-qV_D-MyB20NDFBgC-R9xvCrIlH0kQ,5719
|
5
|
+
collections_cache-0.3.4.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
6
|
+
collections_cache-0.3.4.20250303.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
|
2
|
-
collections_cache/collections_cache.py,sha256=IuHDhrQlCqX4oC3s7cwJ-spWI28O3uQ4_IZJtdUtLPE,6387
|
3
|
-
collections_cache-0.3.3.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
|
4
|
-
collections_cache-0.3.3.20250303.dist-info/METADATA,sha256=uxdp9Cfyq-kSHofaNjjKfCa3hk0OBRk73x0XcLH8Z_g,4993
|
5
|
-
collections_cache-0.3.3.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
6
|
-
collections_cache-0.3.3.20250303.dist-info/RECORD,,
|
{collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/LICENSE
RENAMED
File without changes
|
{collections_cache-0.3.3.20250303.dist-info → collections_cache-0.3.4.20250303.dist-info}/WHEEL
RENAMED
File without changes
|