HKUDS / LightRAG

"LightRAG: Simple and Fast Retrieval-Augmented Generation"
https://arxiv.org/abs/2410.05779
MIT License
9.26k stars 1.14k forks source link

Only update storage if there was something to insert #263

Closed detaos closed 1 week ago

detaos commented 1 week ago

Before, the finally block would always call _insert_done(), which writes out the vdb_* and kv_store_* files ... even if there was nothing to insert (because all docs had already been inserted). This was causing the speed of skippable inserts to become very slow as the graph grew.

LarFii commented 1 week ago

Thanks, you're right.