Anyone who has tried Jgit's InMemoryRepository . Want to know how much it helps in performance ? I can say it improves disk performance, but don't have any idea about how it affects memory? Any insights please.
Asked
Active
Viewed 777 times
1 Answers
1
It affects memory in that the repo size will be stored in it.
And the own InMemoryRepository.java
documentation does mention:
Memory used is released only when this object is garbage collected.
Closing the repository has no impact on its memory.
However, it also states (when you want top use it as in this question) that:
This implementation builds on the DFS repository by storing all reference and object data in the local process.
It is not very efficient and exists only for unit testing and small experiments.
So don't put too large a repo in there.
-
Thanks,How about storing object data in remote/ local DB? – Chetna Chaudhari Jun 15 '14 at 07:07
-
@ChetnaChaudhari the function `InMemoryRepository` is only for storing in memory, so in a local (in memory) repo by definition. This isn't for DB. – VonC Jun 15 '14 at 07:09
-
Ohh seems I missed to mention, What about writing a class which will extend DfsRepository, and that will serve from local DB. I know InMemoryRepository is just a example provided. – Chetna Chaudhari Jun 15 '14 at 07:14
-
@ChetnaChaudhari that I wouldn't know. That DB would still need to be a compatible Git repo though. – VonC Jun 15 '14 at 07:15