How Do I Increase CPU Utilization In Calc

asked 2020-04-27 21:47:18 +0200

PK232 gravatar image

updated 2020-04-29 02:02:40 +0200

I have a spread sheet in Calc with over 40,000 lines with data in cells 24 across. After adding newlines, I do a sort and then use a macro to identify and mark lines that have duplicate values in the cells in one column. I then use a filter to isolate those duplicated lines and delete those lines using Sheet/Delete Rows. There are often 500 duplicate lines unevenly distributed and it takes over 10 minutes for the deletion to be accomplished. One thing I have noticed is that during this time, the CPU utilization averages only 25%. Since I am only twiddling my thumbs waiting for the deletion process to finish, is it possible to increase the CPU utilization to accomplish the task in a shorter amount of time? I really do not care if any other process is affected negatively.

Edit: OS: Windows 7 LibreOffice: (x64)

Edit 2: Version: (x64) CPU threads: 4 OS: Windows 6.1 Service Pack 1 Build 7601 UI render: GL VCL: win; Locale: en-US (en_US) UI-Language: en-US Calc: CL

edit retag flag offensive close merge delete


Please edit your question and add the information in Menu/Help/About LibreOffice, to see what is your configuration.

m.a.riosv gravatar imagem.a.riosv ( 2020-04-27 22:36:08 +0200 )edit

You never can do such thing on a application level but on an operating system level (e.g on Linux you could use the renice command to alter the priority of a process, but you don't mention you operating system).

Opaque gravatar imageOpaque ( 2020-04-27 23:54:03 +0200 )edit

I have been using Slackware on servers since the mid 90s so I am familiar with renice but alas my desktop is still on Windows 7 and that probably won't change until I run into the lack of a compatible driver for a new peripheral. I was just hoping for a magic cure since it seems rather foolish to throttle a foreground process to 25% of the available processor cycles while keeping the other 75% doing nothing or in reserve.
Thanks for commenting.

PK232 gravatar imagePK232 ( 2020-04-28 02:52:12 +0200 )edit

I'm going to bet the culprit is in the macro(s). Any chance you could dump the data and share the workbook here with the macro so that folks could take a look?

DrewJensen gravatar imageDrewJensen ( 2020-04-28 09:25:25 +0200 )edit

All the information in Menu/Help/About LibreOffice is needed to know if for calc, OpenCL and Multi-Threaded calculation are enable, although as Drew comment surely slowness is in relation with the macro.

m.a.riosv gravatar imagem.a.riosv ( 2020-04-28 11:39:09 +0200 )edit

@m.a.riosv I hope I have added the information you were looking for in the original question. Also, so you can better consider the times in the next paragraph, the computer is a white box I put together circa 2016. It has an Intel i5-7600 @3.5 GHz CPU, 16 GB of RAM, and an Asus B250M-C mother board.

PK232 gravatar imagePK232 ( 2020-04-29 02:12:40 +0200 )edit

@Drew Jensen Before I go to the trouble of trying to sanitize the macro, I wonder if it is really part of the problem. The macros are only used prior to the deletion of the rows with duplicate data in the cells of one column. A macro is not used to delete the rows.

As a test, I did everything up to the point of the deletion and then saved the file. I did not have as much new data to add as I normally add, but it was enough to produce 176 rows that needed to be deleted. Manually selecting Sheet/Delete Rows, it took 4 minutes and 19 seconds to the delete the rows. After closing the file without saving, I opened the file that I had saved previously, deleted all the custom macro modules (2), and repeated the manual deletion. This time it took 4 minutes 15 ...(plus)

PK232 gravatar imagePK232 ( 2020-04-29 02:18:26 +0200 )edit

WOW - so I tried this with a file here; Linux, AMD 4 core, 8 gig ram. (and I left a number of CPU intensive BOINC jobs running in the background)

Calc file with a sheet of ~57,000 rows x 39 columns Lots of array functions in that sheet The slowest part was the sort and that was less then a minute The delete of 500 rows takes only a few seconds. I didn't set any filters, IDK maybe that is a factor

EDIT - one thing I noticed i that after the sort I had a bunch of DIV errors - because I suppose the sheet was automatically recalculating and some of the array functions got messed up with me willy nilly sorting on random columns. What I didn't do and I wish I had was to turn off auto recalculate before doing the sort and delte ; don't ...(more)

DrewJensen gravatar imageDrewJensen ( 2020-04-29 05:50:42 +0200 )edit

not going to the details of the intended deletions, my experience with win task manager (win7-64): cpu usage is limited to the 'per core fraction' of 100 percent (~12,5% on a 8 core machine) while not activating 'threaded' (but as well threaded as 'openCL' bear the risk of unnoticed calculation errors (ctrl-shift-F9 helps out)), linux opposite shows 100% - with 'top' - and sometimes more than that with other processes or threaded active, thus to get better values shown use linux or buy a machine with less cpu cores ;-)

newbie-02 gravatar imagenewbie-02 ( 2020-05-01 20:19:35 +0200 )edit