Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - A text document with spreadsheet = slow opening spread sheet
A text document with spreadsheet = slow opening spread sheet
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Wed Dec 01, 2010 5:16 am    Post subject: A text document with spreadsheet = slow opening spread sheet

Hi,

I have made an invoice text document with a spreadsheet inside to make the calculations and summing up. I have used it for several years.

Double clicking on the spreadsheet is takes several seconds before it opens and closes. It gets even slower when Neooffice (3.1.2 patch 1) has been running for a day or two. Up to 6-7 seconds!!!! It has been like this since 3.0 or 3.1 (I am not sure). On older versions t used to be slow only once, then fast (caching?).
Open office 3.2.0 does this instantly. (tested with both applications running side by side with 2 GB of free memory). Macmini 2.53 4GB OS 10.6.5.

Any thoughts or solutions?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Dec 01, 2010 10:26 am    Post subject: Re: A text document with spreadsheet = slow opening spread s

RogerJonsson wrote:
Double clicking on the spreadsheet is takes several seconds before it opens and closes. It gets even slower when Neooffice (3.1.2 patch 1) has been running for a day or two. Up to 6-7 seconds!!!! It has been like this since 3.0 or 3.1 (I am not sure). On older versions t used to be slow only once, then fast (caching?).


Thank you for the sample document. However, I cannot reproduce the behavior that you see on machines. When I have NeoOffice already open and then I double-click on your sample file, the document opens within a second or two. When I open the same document in OpenOffice.org 3.2.1, it opens within about the same time. While OpenOffice.org 3.2.1 seems to open the file slightly faster, the difference in time was too small for me to reliably measure.

After you quit and reopen NeoOffice, how long does it take for your sample document to open on your machine?

Patrick
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Wed Dec 01, 2010 2:02 pm    Post subject:

2 seconds. (Open office takes half a second).
After having worked with 10-15 invoices during the day it often takes 5-6 seconds to open the spread sheet and the same to close it.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Dec 01, 2010 2:23 pm    Post subject:

First let me address why you the first load of your document takes 2 seconds versus OpenOffice.org's half a second. The reason that NeoOffice is slightly slower is that when you first open a document, NeoOffice has its underlying OpenOffice.org pre-populate all of the menus in the menubar so that the menus are responsive when clicked. In OpenOffice.org, menus are not populated until they are actually clicked so moving through the menus in the menubar seems to hang at certain points. Essentially, due to some technical constraints imposed by Apple's Java we have moved roughy a second or so of OpenOffice.org's menu initialization to when the document is loaded. This is not something that you can avoid or tweak.

As for the deterioration in speed, I still cannot reproduce that behavior on my machine. I opened and closed your sample document a couple of dozen times in a row and the load time remained constant at 2 seconds.

Is it possible that NeoOffice is doing something else while you are opening the document like saving or autosaving another document that is already open?

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Dec 01, 2010 4:00 pm    Post subject:

pluby wrote:
As for the deterioration in speed, I still cannot reproduce that behavior on my machine. I opened and closed your sample document a couple of dozen times in a row and the load time remained constant at 2 seconds.


Although I could not reproduce the speed deterioration, I was curious how much of the 2 or 3 second spreadsheet load time on my machine is due to NeoOffice invoking OpenOffice's menu initialization during document load. So I turned off that menu initialization in our code and load times consistently dropped by half. Of course, the menus didn't work right but that suggests that menu initialization might part of the problem.

While we cannot eliminate the menu initialization during load because we use Apple's Java to support native menu and Apple's Java has a technical limitation that prevents us from delaying this initialization like OpenOffice.org does, I may have a workaround for you.

The workaround I have is to convert the entire document to a spreadsheet. In the attached sample spreadsheet, I copied the text and embedded spreadsheet from your sample Writer document into a new Calc document. After saving this spreadsheet, opening it takes less than 2 seconds and there is no additional wait to start editing the line items in the invoice.

Does this workaround speed up open up the document for you?

Patrick
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Wed Dec 01, 2010 4:23 pm    Post subject:

Not the first time, it takes about two seconds, but the following spreadsheets opens much quicker. ( I made a few different just to test). It behaves more like my invoices worked a year a go or so. First one slow, the following faster.

I hadn't upgraded for half a year or so, but when I did (to 3.1 something) this fall, this extra slowness on every open and close of the spreadsheet inside the invoice started.
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Wed Dec 01, 2010 4:28 pm    Post subject:

I cant repeat the increased slowness just by going through many invoices in a row. It seems to happen over time, even when I am not actually using Neooffice.
If I restart Neooffice I get back to the 2s open/close time.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Dec 01, 2010 5:06 pm    Post subject:

I think I might have found a fix that speeds up the opening of embedded spreadsheets by a significant amount. It is still slower than OpenOffice.org with my fix it is much closer in speed to OpenOffice.org.

I looked closely through all of the menu initialization code changes that I have made since we upgraded NeoOffice to the OpenOffice.org 3.x code to see if I could pinpoint if any specific changes might be causing this slowness. OpenOffice.org 3.x's menu initialization code is doing much more work and is much slower than it was in the OpenOffice.org 2.2.x code that we used in the NeoOffice 2.2.x versions so over the last 18 months I have had to make many changes to our code to regain lost menu initialization speed.

What I found was that our code was doing a complete reinitialization of the menus immediately after opening the embedded spreadsheet. I fixed this by only reinitializing the menu items that you see in the menubar and not their submenus.

Can you install the following test patch and tell us if you see any decrease in the time that it takes to open or close an embedded spreadsheet?:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-6-Intel.dmg

PowerPC:
http://joe.neooffice.org/test/NeoOffice-3.1.2-Patch-1-Test-6-PowerPC.dmg

Edit by pluby: I have created bug 3643 to track this bug.

Patrick
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Thu Dec 02, 2010 12:26 am    Post subject:

Thanks!
Opening and closing time was cut to half, which is a huge improvement!
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Dec 02, 2010 12:23 pm    Post subject:

RogerJonsson wrote:
Thanks!
Opening and closing time was cut to half, which is a huge improvement


That is good to hear.

If the other problem occurs again (slowdown after keeping NeoOffice open for more than a day) can you tell us if it reverts back to normal after opening and closing the embedded spreadsheet once?

My theory is that that problem occurs because after letting NeoOffice run in the background, Mac OS X frees up memory on your machine for the applications that you are actively using by "swapping out" the data in memory that NeoOffice is using to your hard drive.

Once this "swapping out" occurs, you will notice a lag when you make NeoOffice the active application. This is because Mac OS X must reload all of the swapped out data from hard drive back into memory.

Patrick
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Thu Dec 02, 2010 1:00 pm    Post subject:

pluby wrote:


If the other problem occurs again (slowdown after keeping NeoOffice open for more than a day) can you tell us if it reverts back to normal after opening and closing the embedded spreadsheet once?


I will.

Quote:
My theory is that that problem occurs because after letting NeoOffice run in the background, Mac OS X frees up memory on your machine for the applications that you are actively using by "swapping out" the data in memory that NeoOffice is using to your hard drive.

Once this "swapping out" occurs, you will notice a lag when you make NeoOffice the active application. This is because Mac OS X must reload all of the swapped out data from hard drive back into memory.


Yes, sometimes I wish there was more control over the memory system. Some applications ruin everything for others. Copying large videofiles is a particularly good way to get rid of free memory... I am sure there are ways around it, but I guess it is not very easy.
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Fri Dec 03, 2010 2:12 am    Post subject:

Having lots of RAM on your system is one of the easiest and cheapest ways of having a smooth OS X experience. I started out years ago with 640 MB on an iBook and I upgraded my unibody MacBook to 4 GB.

While that doesn't make application faster per se, it does tend do away with any hitches and many sorts of temporary freezes. Oddly enough, Apple doesn't kit baseline Macs out with copious RAM.

Good luck with NeoOffice Smile.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
RogerJonsson
Agent


Joined: Jan 06, 2005
Posts: 11

PostPosted: Fri Dec 03, 2010 2:48 am    Post subject:

I do have 4GB. But some software use it up while watching a movie, OS X is caching the whole file as it runs until there is no memory left. Totally senseless! In VLC this can be turned off, when MMAP is turned on the computer is completely useless and crippled after having watched a DVD-movie!
Not even 8GB would help when simply copying an 8GM movie. -The memory cache isn't cleared unless the original is wasted or I use iFreeMemory to clear the caches.

However. Neooffice got slower even though there had been 1 GB left (I think).

The new patch still stays at one second opening and closing the spreadsheet. Also my invoice documents open faster. Feels much better!
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Fri Dec 03, 2010 12:11 pm    Post subject:

RogerJonsson wrote:
I do have 4GB. But some software use it up while watching a movie, OS X is caching the whole file as it runs until there is no memory left. Totally senseless! In VLC this can be turned off, when MMAP is turned on the computer is completely useless and crippled after having watched a DVD-movie!


Actually, the idea is that OSX keeps the memory in use all the time and not chuck anything out until it needs more memory. Which makes sense in some things.

As for Quicktime, it doesn't have the nicest architecture around. VLC is packet-based, so it needs far fewer resources. Also, I di not usually keep a movie open while I use an office suite. Watching film and typing documents demands more attention than I have Wink.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat Dec 04, 2010 4:49 pm    Post subject:

FYI. I have included the fix for this bug in NeoOffice 3.1.2 Patch 2. You can download the patch from the NeoOffice patch download page.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.