Zim

Memory Usage

Asked by Jeremy on 2016-08-17

Hello Community,

I would like to understand the memory usage of ZIM Wiki, hereby just referred to as ZIM.

Okay so one has a notebook and let's say there are 50 pages and subpages. I realize this would mean 50 text files with some directories for the subpages.

Now are all 50 pages/subpages open and loaded into memory or does ZIM simply open a file when viewing then close it when no longer in the main display thus only one file is open at a time?

Thanks!

Jeremy

Question information

Language:
English Edit question
Status:
Answered
For:
Zim Edit question
Assignee:
No assignee Edit question
Last query:
2016-08-17
Last reply:
2016-11-20
mtibbi (marcio-tibirica) said : #1

I think Zim opens only one page at a time. I say that because I have some notebooks with hundreds of pages and could not perceive any slow down if compared to notebooks with few pages. I think this is a major advantage of Zim if compared with other "similar" applications. Some note taking applications store pages, or notes, into single file database. In the beginning, with fresh empty database the application is lightning fast, but after hundreds of pages stored, it starts to slow down, and after one thousand or more pages it becomes unbearably slow.

Jeremy (r-jeremy) said : #2

Thanks Mtibbi for your the response.

I have to say based on my limited testing thus far it appears Zim does NOT close files.

The way I determined this was simply start Zim then note the RAM usage. I then clicked on a page link on the left and noted the RAM usage and as expected it went up. So I then clicked another page link on the left and again the RAM usage went up. I repeated this clicking on dozens of page links while checking the RAM used after each click. The memory usage only went up and never down.

Thus Zim is simply keeping all files open. I agree that having multiple smaller files than say one big long one keeps things running better for flat files. What I don't know and it would be nice is if Zim closes page files that aren't used after a while to keep RAM usage down.

I still need more time with the program to really say for sure. Still as stated my tests revealed only increasing amounts of memory usage.

Anyone else should feel free to jump in and add to this subject.

pleiades (pleiades) said : #3

Hello Jeremy,

Im using Zim v0.65

I checked the RAM usage and when clicking on some pages the RAM went up just a little, but it also went down when i clicked on another page.

I also found out that when you close a zim notebook if will stay in memory, you have to quit to remove it from memory.

Im not too worried about this as long its not eating a huge amount of memory.

maybe we can make a plugin that would quit a notebook after its close for an amount of time.

Jeremy (r-jeremy) said : #4

Hello Pleiades,

That is cool you saw some memory reduction. As stated I never saw that with a Notepad of a few dozens pages. I am a new Zim and just trying to understand the application before really using it heavily.

I like the layout of Zim Wiki and want to get better organized. I have a lot of notes and resources I could put into this application and what I don't want is this program ballooning into huge RAM usage of hundreds of MBs or GBs of usage. Sure if 30 to 150MB RAM is needed fine but if 800MB to 1.5GB is needed for hundreds and hundreds and hundreds of pages that is overkill. I fully realize that this information is stored as markdown text so the RAM resources should be smaller than say a LibreOffice document.

Also there is the issue of files open. Zim Wiki stores every "page" as a file which is great actually. So if one has a wiki of hundreds and hundreds of pages (easy to do) that is hundreds and hundreds of potentially open files. In and of itself not bad but now throw in the OS, web browser, and all the other applications running and you can start to run into open file limits (which can be modified) and other issues. What would be nice is if Zim only opens the page that is displayed then closes that text file when you click off. Of course some kind of information/index/database file would need to remain open too to link things together and such.

Those are my thoughts anyway.

pleiades (pleiades) said : #5

I'm also new to using zim, i'm in the process of moving all files into it from other programs i tried, i choose zim because of the flat file database and text file centric, so far i have not seen it using memory in excess, i have not close it yet in a week on my laptop.

i dont think it will balloon that big even when you open all the pages, currently, zim is for a single person use

sojusnik (sojusnik) said : #6

@Jeremy

I'm using Zim for years with an evergrowing notebook with hundreds of pages and never perceived a slowdown or an RAM overload. At the moment it takes about 50 MB RAM.

Zim is very well written and is resource friendly, you should definitely give it a try :)

Jeremy (r-jeremy) said : #7

@sojusnik

Thanks for your feedback!

I am indeed using ZIM. It is pretty great as I used to have a lot of text files for notes and such. I generally prefer a text document to bloated apps like LibreOffice for things like server configurations, OS notes, etc. Still things were scattered around and with ZIM I have become more organized.

I haven't seen anything heavy RAM wise but was wondering as I understand each page is a file and thus another item to load. I know I'll eventually end up with hundreds and hundreds of pages. So I wanted to check in to see others' mileage on RAM resources.

Thanks again mate for sharing your experience. It always helps to hear how things go with others.

Cheers!

Jeremy

sojusnik (sojusnik) said : #8

You're welcome!

Jeremy <email address hidden> schrieb am So., 20. Nov. 2016
um 21:43 Uhr:

> Question #352467 on Zim changed:
> https://answers.launchpad.net/zim/+question/352467
>
> Jeremy posted a new comment:
> @sojusnik
>
> Thanks for your feedback!
>
> I am indeed using ZIM. It is pretty great as I used to have a lot of
> text files for notes and such. I generally prefer a text document to
> bloated apps like LibreOffice for things like server configurations, OS
> notes, etc. Still things were scattered around and with ZIM I have
> become more organized.
>
> I haven't seen anything heavy RAM wise but was wondering as I understand
> each page is a file and thus another item to load. I know I'll
> eventually end up with hundreds and hundreds of pages. So I wanted to
> check in to see others' mileage on RAM resources.
>
> Thanks again mate for sharing your experience. It always helps to hear
> how things go with others.
>
> Cheers!
>
> Jeremy
>
> --
> You received this question notification because you are subscribed to
> the question.
>

Can you help with this problem?

Provide an answer of your own, or ask Jeremy for more information if necessary.

To post a message you must log in.