Is there a way to open odt file without loading styles?

in microsoft word there is a mode called: draft mode, i loads the document without styles which make the document manipulating very fast in case of big files, is there such an option in libreoffice writer?

I don’t think so. Styles are part of the document itself, even when it is based on a template.

However, the right question to ask if you’re concerned by performance is how formatting impacts responsiveness.

Writer must collect and interpret directives to display text. There is a huge gain when you minimise collection needs (there is little you can do on interpretation). Using styles is the way to go for this because styles are defined only once. Application of a style is simply a reference to the definition. It is extremely fast.

On the contrary, direct formatting has no common factoring. Directives must be parsed on every occurrence. This becomes more and more important when document grows (becomes really noticeable beyond 100-200 pages).

Don’t forget a difference with Word: Word must use direct formatting because it knows only of paragraph styles. In Writer, constraint yourself to apply character styles for bold, italic, colour, font size change, … instead of lazily press keyboard shortcuts. This kind of direct formatting is too often neglected and is a primary contributor do performance degradation.

Page styles are usually widely known because there is no other way to layout pages differently (and ther is no way to create page direct formatting!).

When a document contains many images or drawings, applying frame styles is also a way to improve responsiveness. But, these styles are really difficult to tame and any even slight manual manipulation of the frame creates direct formatting which is difficult to detect (no reported by available tools) and to remove. With really many images, frame styling provides a tremendous gain.

1 Like

i have a MS word file which i want to open with libreoffice, every time i open it it takes long time to open, and if i make a change in the file it takes a long time to be applied. i know that this file is full of mistakes on styles, but how to open it and edit it correctly with LO writer?
i tried opening it with safe mode but i have the same results: very very slow

the file is attached
file.odt (269.3 KB)


—information:
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: kf6 (cairo+wayland)
Locale: en-US (en_US.UTF-8); UI: en-US
24.8.3-1
Calc: threaded

Despite the fact it is now an .odt, it was a .docx. The conversion process introduced “pollution” to translate Word formatting into ODF. This is obvious in the number of character styles starting with WW_5f_Char….

Scrolling through it is a bit slow but acceptable.

I didn’t notice too much direct formatting (character layer) but didn’t check thoroughly. IMHO, the most serious direct formatting is with lists. Obviously, the lists were created (converted) with Format>Bullets & Numbering which is an exact copy of the Word feature leading to a very severe form of direct formatting. You should create a list style and associate it with your List Paragraph paragraph style. Caution! Removing Format>Bullets & … to replace it with a bullet paragraph style to get rid of list direct formatting is tricky.

It is also possible you have direct formatting on the number in the footnotes because some of them don’t follow modification to Footnote Characters. In principle, this is no possible in Writer; it should be inheritance from DOCX conversion. There is also the weird position of the footnote number which is set below the base line.

Looking more carefully, your footnotes are full of direct formatting.

i have deleted hundreds of direct formatting before sending the file.
my problem now with the file is that LO writer stops working after few maniplations and says: not responding, and i need to wait long time till it comes to work again and then it stops and so on.

I get the same behaviour when I modify styles but I regain control after 10-20 seconds (my computer is rather old).

If tracking and removing direct formatting (DF) is too tedious, you can paste as unformatted text in a blank document, recreate your styles and finally add the footnotes. This may take time but is guaranteed to get rif of all DF

1 Like

i think that the problem is in Libreoffice Writer.
i tried to open the file with calligra words and it open it without any lag or problem.
(so i need to open a new file in LO and copy the content from calligra.)
and i also tried that with another .docx file and i get the same result.

should i report this as a bug in bugzilla?

You may report the problem, especially, if you can provide an example to test.
But, if you open .docx-files they are “converted” in the LibreOffice-model and and re-translated on saving. This will always be time-consuming.

Test operation

I switched to web view, which made content manipulation a little smoother. Writer is then (at least mostly) relieved of the task of constant repagination. Note that this will dramatically alter layout in some cases. All content should be preserved. Don’t panic!

Pitfall

Swithcing back to normal view locked writer up for ~10 minutes. I had at the time only removed a tiny bit of the “offending” format-turned-to-styles.

Conclusion

Switch to web view may be a workaround to enable easy manipulation of content, but maybe you should then be prepared to fix it all in one sitting. Do not work on layout while using this view. Also, make sure you have an “untouched” copy of your file, in case of corruption.

1 Like

so, is this mega lag a bug in libreoffice that i should report in bugzilla?