[Solved] Open master document in read-only mode

Discuss the word processor

[Solved] Open master document in read-only mode

Postby Hagar Delest » Thu Aug 08, 2019 9:24 am

Hi,

I've some big documents (lots of pics that have already been optimized for screen display). I'm trying to figure out if a master document could help speed up the load/save operations.

Basically with a standard document, I can open it in read-only mode (per document basis with its properties) so that I'm not bothered by the automatic saving (that takes 1'20'' for my 45MB document, locking AOO during the operation). The problem with the master document is that it doesn't open in read-only mode at all. Even if I don't update the links at opening, even if the load setting for Writer documents is to never update links. Strangely, it is written read-only in the title bar.

Any hint?
Thanks.

As a side note, I've noticed that the odm file is as big as the original one. I've made a single subdocument with the part containing almost all the pics (30MB) and the remaining part is in the master doc but it is still 45MB...
At one point I managed to get a master doc of 15MB but can't reproduce that anymore.
Thus, the save operation does not speed up anything at all.
Last edited by Hagar Delest on Sat Mar 28, 2020 7:09 pm, edited 2 times in total.
Reason: tagged solved
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Open master document in read-only mode

Postby floris v » Thu Aug 08, 2019 10:45 am

If you don't make changes, there's no need for the autosave, is there? I actually turned it off entirely and instead manually save every few minutes.
Maybe I'm a bit Pharisaic about this, but shouldn't you put all real content in sub documents and only use the master document as a container for the sub documents?
AOO 4.1.6 op Linux Mint
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
floris v
Moderator
 
Posts: 4203
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Open master document in read-only mode

Postby John_Ha » Thu Aug 08, 2019 10:48 am

Hagar Delest wrote: I've made a single subdocument with the part containing almost all the pics (30MB)

Hagar

See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer. Using the hints will vastly speed up the saves. For example, use linked images to very small images while editing - swap out the tiny images for the proper images for publication. See Items 5 and 6 in the tutorial.

Hagar Delest wrote:As a side note, I've noticed that the odm file is as big as the original one. I've made a single subdocument with the part containing almost all the pics (30MB) and the remaining part is in the master doc but it is still 45MB...
At one point I managed to get a master doc of 15MB but can't reproduce that anymore.
Thus, the save operation does not speed up anything at all.

I am pretty sure you are doing something wrong as the Master should be almost trivial in size as it only contains a) any content you placed in it which should be minimal and b) the links to the sub-documents. My master document for a 10 MB magazine with 16 pages and lots of images is 31kB.

If you send me your files or give me a link to them I will have a look at it for you.

floris v wrote:Maybe I'm a bit Pharisaic about this, but shouldn't you put all real content in sub documents and only use the master document as a container for the sub documents?

floris

That is exactly how I do it.

Hagar Delest wrote:The problem with the master document is that it doesn't open in read-only mode at all. Even if I don't update the links at opening, even if the load setting for Writer documents is to never update links. Strangely, it is written read-only in the title bar.

Got it! Oh yes it does open in read only :super:

The only thing which is editable in a master document is any text you have placed in it. So, say you have a book with an Introduction and six chapters. You can do that in two ways:

Case 1: Create a minimal master document with title page etc and call seven sub-documents. Create seven sub documents, one for Introduction and one for each of the six chapters.

Case 2: Create a bigger master document with title page etc and the Introduction and call six sub-documents. Create six sub documents, one for each of the six chapters.

In Case 2 you will have Read Only showing if your cursor is located in chapters 1 to 6. But if you locate your cursor in the title page or in the Introduction it will not show read only and you can edit it as normal.

So, you have too much content in your master - take it out and put it in another sub-document.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Open master document in read-only mode

Postby RoryOF » Thu Aug 08, 2019 12:33 pm

I have never used Master Documents, but I have two suggestions:

Firstly, disable displaying of illustrations if the purpose of the editing is merely to edit text (/Tools /Options /OpenOffice Write /View : uncheck Display Graphics and objects. [This path is given for those who don't know of its existence]).

Secondly, if the file is finished and for distribution only, Export as PDF. If there are comments and inputs from others, request them as text/emails referencing the page in the PDF so that they don't need (or get) edit access to the document as they might *~'*!"£ it up.

Hagar being a longtime user of OpenOffice I shouldn't need to emphasise using a copy document until certain all is stable.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open master document in read-only mode

Postby Hagar Delest » Thu Aug 08, 2019 11:19 pm

Thanks for all your inputs!
I'll try to reply in the same order.

The file is a compilation of data gathered on all day along. It is opened and saved with changes many times a day. The export as PDF is extremely rare and in such case, mostly a part of the document only is exported. As it grows in size, the save operation becomes quite significant (almost 2 minutes, with reduced performance for the other AOO windows).
I'm not sure the AutoSave feature has ever been of real help, so I'm also considering turning it off. But I'd like to be sure that my desired scenario is not too cumbersome before I do that.

I tried to keep the master doc as a mere container but I noticed that if was as if AOO was repaginating all the docs and then saving all of them. If completely defeats the point of the master doc, especially when no change has been done. And by default, since you update the master doc by updating the links at opening, it considers it has been modified. Very strange.
Note that with small sub-docs, it's hardly visible. But with heavy sub-docs it is a nightmare. I'll try with the default option when creating a master doc from level 1 headings.

I know about picture optimization. Then only thing I've not done yet is to link the pics instead of embedding them. But it requires additional time (plus all the current pics to put out of the file).

I guess there is indeed a problem with the size. I started with an almost empty master doc, then added the 30MB part as a sub doc and then copied and pasted the 15MB left inside the master doc (agreed it should have been in different sub-docs but I'd like to keep as less sub-docs as possible). Still strange to end up with a 45 MB master doc...
Thanks for the help proposed but I can't send the file, it contains confidential data.

John_Ha, I'm like your case 2. But this is a glitch IMHO. Especially if all the content is in the sub-documents, there is no point asking for the links update. Of course they should be updated else, the document would be blank! So, once all is loaded, what prevents it to go straight to read-only mode? Note that if I deactivate the edit mode, it asks me if I want to save the changes (even if no changes made at all, but I guess it assumes that updating the links should be considered as a change, which is weird), then it goes in RO mode as expected.
As said above, I could break up the file in several sub-docs but they seem to be all repaginated and saved, leading to a significantly longer save operation in the end.

Rory, I need the pics to be displayed be it charts or pics. In fact, I use AOO as an alternate of OneNote: content management optimized with the help of macros, open format [human readable] in case of trouble (did save me a couple of times)...
This is a living document (one has almost 2,000 hours edition time) and I've backups of course.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Open master document in read-only mode

Postby John_Ha » Fri Aug 09, 2019 11:19 am

Hagar

Thanks for the help proposed but I can't send the file, it contains confidential data.

You could anonymise the data with
Edit > Find and Replace
Find box [a-z]
Replace box x
Options: Match case: YES, Regular expressions: YES
click Replace all

Repeat the above using [A-Z] and X to scramble the upper case letters, and [0-9] and 0 to scramble numeric data.

The file is a compilation of data gathered on all day along ... This is a living document (one has almost 2,000 hours edition time)

You almost certainly have a "tangled" document. Create a new, empty document and go File > Insert ..., and pull in the original. Save the result - it should remove any tangles and save much quicker.

Of course they should be updated else, the document would be blank!

Agreed when you open the document but after that, selective updates are very useful. I often edit a sub document but don't yet save it. I update to see the effect and if I don't like it I re-open the sub which cancels the edits and I try again. Only sub documents should be write protected - text in the .odm file should always be editable.

Have you ever gone File > Export ..., and exported it as a .odt file? This creates a .odt file of the entire document - are you now using that in error? Each section in the exported .odt file is write protected - Format > Sections ..., allows you to remove the protection.

If you go Format > Sections ..., in the master .odm file you can remove the write protection from the sub documents and edit them (note that any text in the master does not appear in the list of sections so you do not have the option to write protect any text in the master file itself). Note that you do not edit the sub documents themselves - you just edit "the text which has been pulled from the sub documents into a section in the 'master document file as it appears on screen' ". You must export the "master document as shown on the screen" to a .odT to keep the edits - merely saving the .odM file loses the edits to the "text originally in the sub docs".
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Open master document in read-only mode

Postby RoryOF » Fri Aug 09, 2019 12:24 pm

One thought: if this is mainly on one computer, an SSD (Solid State Disk) might speed matters up. The various suggestions from John_Ha will be helpful.

I don't like the 30MB file - could that be split into multiple smaller files? An SSD will counteract the delay in the opening of such multiple sub-files.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open master document in read-only mode

Postby floris v » Fri Aug 09, 2019 12:38 pm

Maybe you should work instead with an "index document" instead of a master document, and many sub documents linked to from the index document. You'd need a macro that saves selected text to a separate document, and adds a hyperlink to that document in the index document. Your only manual input would be to provide a meaningful name for that sub document. Writing that macro will probably take less time than all the waiting for file saves that you're going through now.
AOO 4.1.6 op Linux Mint
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
floris v
Moderator
 
Posts: 4203
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Open master document in read-only mode

Postby Hagar Delest » Fri Aug 09, 2019 2:20 pm

John, the problem is not with the text but with the pics.
I did not at first imagine that it could grow this big. This is why I did not think about the optimization when I started this file.

The document doesn't appear to be tangled. There is no change after the insert operation in a new file, either in the file size or in the load/save time.

In my case, I want the master doc to be read-only at opening also, meaning: if I want to edit it, I'll click the Edit button. By default, I want it read-only, as it does correctly with a standard .odt document when that option is checked in its properties.

It is already an SSD HD. Agreed, 30MB for a file is not a good practice. There are 750 pics in total. And I need the whole document to be displayed at once, I can't have to navigate in sub-docs separately (several cross-references among the different parts).

But maybe separating the big part with the pics and linking it as a section might help, I'll try.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Open master document in read-only mode

Postby John_Ha » Fri Aug 09, 2019 3:56 pm

Hagar Delest wrote:I did not at first imagine that it could grow this big. This is why I did not think about the optimization when I started this file.

We have all been there!
Hagar Delest wrote:the problem is not with the text but with the pics...There are 750 pics in total. And I need the whole document to be displayed at once, I can't have to navigate in sub-docs separately (several cross-references among the different parts).

Linking the pics should help. Alternatively, but very similar, you could put a hyperlink to each picture where each picture is located in the folder in which the document is stored or in a \Images folder below it.

If the pics are 24 bit, 17 million colours can you reduce them to 8 bit, 256 colours? This will cut the image file size to 1/3 without any loss of quality. It should not be noticeable on graphics images and most photos. Be careful about using any Reduce Colour Depth feature in a graphics editor as it is probably optimised for photos and uses a non-linear algorithm which favours the colours in use. If used with a graphic image some colours will get completely lost and white will often take on a colour tinge. It is better to save a 24 bit PNG graphics file as a GIF file because GIF uses 8 bit colour and the colour depth reducer to GIF is linear so whites stay white etc.

Hagar Delest wrote:In my case, I want the master doc to be read-only at opening also, meaning: if I want to edit it, I'll click the Edit button. By default, I want it read-only, as it does correctly with a standard .odt document when that option is checked in its properties.

There are two ways to do that:

1. Put what you want to be read only into a section and set the section to be read only (assuming a master document .odm file permits it), or
2. Put what you want to be read only into a sub document because all sub documents are read only.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Open master document in read-only mode

Postby Hagar Delest » Sat Aug 10, 2019 11:14 pm

I'll try the file (the one with the pics) inserted as a section linked. And perhaps link the pics instead of embed them.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Open master document in read-only mode

Postby John_Ha » Sun Aug 11, 2019 12:05 am

Hagar Delest wrote:Agreed, 30MB for a file is not a good practice. There are 750 pics in total. And I need the whole document to be displayed at once, I can't have to navigate in sub-docs separately (several cross-references among the different parts).

A thought. This is almost a database application rather than a text document application. Could it be done with a database and various reports to provide the user view?

Also AOO does tend to lose images, even linked images too, especially when the images are large. You may be safer using LO where the image handling routines have been rewritten to prevent image loss - see 16. Lost images ... and a word of caution about using AutoRecovery. LibreOffice 6.1 may now be better than AOO in the tutorial above.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Open master document in read-only mode

Postby RoryOF » Sun Aug 11, 2019 1:59 am

The images should be in a format that doe not require additional processing, that is, not jpeg. I find it is sufficient to disable making of backup copy (this may not be necessary, but the server to which I am working does not permit OO make backups directly) and disable saving of autorecovery information to give stability of images in OO.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open master document in read-only mode

Postby Hagar Delest » Sun Aug 11, 2019 12:13 pm

Can't use a database for that because it's a kind of huge notebook spanning over several years. I need to easily access notes taken a while ago. I use the heading levels to sort the notes so I can easily browse the contents with the Navigator.

I've never lost any image so far. I reduce them before insertion because I keep the originals somewhere else. Thus, if I need the full resolution version, I know where to find them. But they are not stored on a HD, thus, I can't link them. They are all below 160kB I would say. And I convert graphics received in jpg in png with color depth decrease (thanks to a macro in the Gimp, it's a couple of clicks worth).

I'll try to deactivate the autorecovery feature. Then link pics and let you know.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Open master document in read-only mode

Postby RoryOF » Sun Aug 11, 2019 1:28 pm

The picture loss may not be a problem with the WinPenPort version, but certainly has been (and still is? I'm not taking any chance!) with Windows and linux versions.

Perhaps it would be worth running a Profiler beside your application to see what system calls are taking the time.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31414
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Open master document in read-only mode

Postby Hagar Delest » Sat Mar 28, 2020 7:20 pm

Well, I feel quite dumb. I tried again the master document and it seems to work quite well eventually.
The main difference is that I didn't put any text in the master document itself. I only kept the index and the 2 blank test sections that comes before/after the index. Then I put all the content of the doc in different sub-documents. Then set the file properties to read only, et voilà!
The update links dialog does pop up at opening, which is still irritating but that is acceptable.
Save and close operations have significantly improved. Still a bit long to close a file which is read only (same duration than updating the links at opening) but it may be needed to clean the memory.
So in the end, not sure what was wrong in the first place. It seems to be the fact that I tried to put content in the master document itself.

If someone knows how to deactivate the update links pop up, that would be great (the Writer option Update links when loading has no effect).
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Open master document in read-only mode

Postby John_Ha » Sat Mar 28, 2020 7:59 pm

As far as I know you cannot prevent the "master document update pop-up" on opening the master document because AOO sees that the master document has links in it so asks you if you want to update the links.

If you say NO, then the sub documents are not brought in. The document on screen is blank apart from what you have in it itself.

If you say YES all the sub documents are pulled in to document on the screen.

NB File > Export ..., allows you to export the document on screen into a (huge) .odt file. The sub documents are Read Only linked sections so go Format > Sections ..., and unlink them (which stops the pop-up on this .odt file) and un-protect them. You now have a conventional .odt file.

With that many images I would abandon AOO and move to LO as LO should be much better - AOO has a tendency to irretrievably lose images. See the discussion in Item 16 [Tutorial] Some useful hints on using images.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK


Return to Writer

Who is online

Users browsing this forum: No registered users and 18 guests