Hi all,
I'm somewhat disturbed by how much RAM LibreOffice consumes while running in hidden mode. My script creates about 90 text documents (.odt files), writes them in a temporary folder, then compiles into one document. Source files are about 100-400 KB each, with some OLE objects in them, and the resulting document is about 5 MB. I also run automatic PDF export, and PDF is about 11 MB. LibreOffice (soffice.bin process as I see it in Gnome System Monitor) takes about 5 GB RAM for this task according to Linux system monitor, so I decided to look deeper. I run psutil.Process(office_pid).memory_info(), then show all dictionary members in a log. There are 7 of them: RSS, Data, Shared, Text, VMS, Lib and Dirty. Two first members show actually used pages, as I understand. VMS is just some system reserve for the process, so I do not care much about it. "Shared" increases to about 100 MB and remains at this level, while RSS and Data increase to 5,6 GB each! And I call doc.dispose() after I finish to work with each file, both source and result. The most mysterious increase happens after adding of page numbers: from 4GB to those 5,6 GB - just for numbering 140 pages with a single field.
The first question I want to ask: is it normal to take so much RAM? And if not, how these numbers can be decreased?
[Python] [Writer] Memory consumption?
Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Return to “Macros and UNO API”
Jump to
- Getting started
- ↳ Survival guide
- ↳ Beginners
- ↳ Getting Started Guide for 4.x
- ↳ Getting Started Guide for 3.x
- ↳ Install, Setup and Troubleshooting
- ↳ Admin Guide
- ↳ MS Windows
- ↳ Linux
- ↳ Mac OSX
- ↳ LibreOffice
- ↳ Tablets
- ↳ Tutorials
- ↳ Writer
- ↳ Calc
- ↳ Base
- Applications
- ↳ Writer
- ↳ Writer Guide for 4.x
- ↳ Writer Guide for 3.x
- ↳ Writer Tutorials
- ↳ Templates
- ↳ Advanced Uses
- ↳ Calc
- ↳ Calc Guide for 4.x
- ↳ Calc Guide for 3.x
- ↳ Calc Functions
- ↳ Calc Tutorials
- ↳ Impress
- ↳ Impress Guide for 4.x
- ↳ Impress Guide for 3.x
- ↳ Draw
- ↳ Draw Guide for 4.x
- ↳ Draw Guide for 3.x
- ↳ Math
- ↳ Math Guide for 4.x
- ↳ Math Guide for 3.x
- ↳ Math Guide for 3.x
- ↳ Base
- ↳ Base Guide for 4.x
- ↳ Wiki
- ↳ Base Tutorials
- ↳ Tables & Queries
- ↳ Forms
- ↳ External Data Sources
- ↳ Reporting
- ↳ Database Examples
- Customizing and Extending
- ↳ Macros and UNO API
- ↳ Basic Guide
- ↳ Code Snippets
- ↳ Extension Repository
- ↳ Macro Repository
- ↳ External Programs
- ↳ Extensions
- ↳ Extensions page
- Community
- ↳ General Discussion
- ↳ Site Feedback
- ↳ Forum Governance
- ↳ User Experience (UX)
- ↳ Announcements
- Business
- ↳ Institutions & Educational
- ↳ Paid support
- ↳ Consultants Directory