100 Commits
Author SHA1 Message Date
Noel Grandin 92f93f3003 output error code when SymFromAddr fails
instead of random data

Change-Id: Iba020ea3a2386e3ad940cc85aac18047c3773967
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06 11:04:33 +02:00
Noel Grandin a93346144e use of template param here confuses Visual Studio
version 17.2.0 Preview 3.0

Change-Id: If73d984b0bbcfd85667ab859db7d86514af6c2b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133166
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19 13:19:09 +02:00
Noel Grandin 4f900a5369 try to improve stack dumping on windows
noting that this commit is completely blind. But we're not getting
good stacks on jenkins, and it doesn't look right to me that we're
using 64-bit functions on 32-bit stacks, so make the 32-bit paths
consistently use 32-bit functions and structures.

Change-Id: I413ab97001246c442df151700cc618df4391e03b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131964
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-23 13:18:48 +01:00
Noel Grandin 224369b351 revert component name changes to makefile
This reverts
    commit 2483cd198b
    Author: Jan-Marek Glogowski <glogow@fbihome.de>
    Date:   Fri Feb 11 19:40:36 2022 +0100
    Correctly depend on source component file
and
    commit 17ec55c480
    Author: Jan-Marek Glogowski <glogow@fbihome.de>
    Date:   Thu Jan 20 10:06:54 2022 +0100
    Fail on non-optional, but filtered component names

because they cause failures on Windows builds that look
like:
warning: failed to load external entity "C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows@2/workdir/ComponentTarget/binaryurp/source/binaryurp.component"
cannot process C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows@2/workdir/ComponentTarget/binaryurp/source/binaryurp.component

Change-Id: Ia34cdabd76b47a6a4686ebd0f96ceb774d3236f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129956
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-15 11:19:43 +01:00
Noel Grandin 31872a3823 fix Options->LibreOffice->View->Visibility->Menu on Windows,
impossible to set to Hide, regression from
    commit 131759a3db
    Date:   Sun Jul 25 16:21:39 2021 +0200
    use officecfg for menu options

Change-Id: I5312be2963d15ab85c267ece073e52984b1a34de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128137
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-08 20:44:57 +01:00
Noel Grandin d2b03c4bfa Revert "lose the caching in ViewObjectContact" because it breaks...
bitmap caching. Added some notes for future would-be optimizers.

This reverts commit 7f02cb80ac.

Change-Id: I39c41ea95d23d4a65edd3cef46a5d86fab48a044
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126425
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2021-12-06 19:46:10 +01:00
Noel Grandin 04e3424f49 map->unordered_map in PropertyMapper
a little bit faster

Change-Id: I11e756e65a76fedeca2525edf37a04b34ac6aeda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126407
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-06 14:53:11 +01:00
Noel Grandin cba21368d8 speed up property access in charts
uno::Any copy and assign is fairly hot, so try and do those operations
in one step

Change-Id: I110566ba98788d5a658d229433de291c8cdf146c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-05 19:57:01 +01:00
Noel Grandin 68723d543d use OMultiTypeInterfaceContainerHelperVar3 in embedserv
Change-Id: Iafb936ae3ba23c0c16c2da8538f8da29688df692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126346
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04 13:31:23 +01:00
Noel Grandin 47cdd3ba60 revert part of "remove counter-productive catch-all blocks"
as sberg points out, this rethrow will not necessarily crash
the process

Change-Id: I0ced6c102d1c0c1bf680b0903fcb232cc891bf92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126167
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01 13:04:17 +01:00
Noel Grandin fabce43fe1 fix thinko in OMultiTypeInterfaceContainerHelperVar2 change
in
    commit d8a526eabe
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Tue Nov 30 21:36:08 2021 +0200
    improve OMultiTypeInterfaceContainerHelperVar2::disposeAndClear

spotted by sberg

Change-Id: I45316c29d82c5ece4c0ff9faa40f656b5aab3c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126166
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01 12:12:57 +01:00
Noel Grandin bf74eb1d16 tdf#133996 speed up opening of ODS with autofilter + conditional formatting
inline some hot methods, and use OUStringLiteral to avoid repeated
construction of an OUString, saves about 3%

Change-Id: I6d09ade4e08a94ed5dd49a8882e26bb5786409d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125873
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26 17:30:33 +01:00
Noel Grandin 05766922e7 speed up Fraction::operator*= a little
for my test spreadsheet this reduced the time spent
in Fraction by 30%

Change-Id: Ib14a93284dbd6c6ea2349c1754979135463ca61b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125878
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26 17:30:10 +01:00
Noel Grandin da6ac377c6 avoid OUString temporary in INetURLObject::changeScheme
Change-Id: I8a97c1d89770fe2c0ba0d3f75ce9f3fec0df2e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125692
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 13:47:16 +01:00
Noel Grandin 7566479a7a tdf#133835 speedup calc autofilter (11)
Size the buffer at construction to avoid realloc

Change-Id: I7fed6e345104fe9d4192aaa9664e7fe2662218bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125691
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 12:29:42 +01:00
Noel Grandin 1b327e4a33 tdf#133835 speedup calc autofilter (9)
Remove the temporary buffer in INetURLObject::setAbsURIRef,
and just write directly to the main buffer.

This is a behaviour change since we are "committing" bad data to the
buffer if the URL is incorrect, but since it that case we set the
whole object to be invalid, that should not matter.

Change-Id: Ic8e7d4027bcb927005edd7de4098f4f525412869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125648
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 12:20:18 +01:00
Noel Grandin a70bd820da tdf#133835 speedup calc autofilter (8)
Add move operator to OUStringBuffer to avoid copy

Change-Id: Ifef326449d87aac79f4b1142db7a53faad427580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125626
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 12:19:59 +01:00
Noel Grandin a6ed758811 tdf#133835 speedup calc autofilter (7)
vcl::Font avoid allocating a new instance if the setter doesn't
change anything, saves 5%

Change-Id: I461a2a8e3709b3f3f20e431cb3b976ad47bed0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125625
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 09:51:25 +01:00
Noel Grandin 7805a224b9 tdf#133835 speedup calc autofilter (6)
INetURLObject::SetPort Avoid allocating temporary string on heap,
saves 20%

Change-Id: I61ba4bd80c561266341143e35650b54b9d70f1d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 07:50:59 +01:00
Noel Grandin dc2010964f tdf#133835 speedup calc autofilter (5)
Tweak INetURLObject to reduce the number of
OUString and OUStringBuffer we create,
saves 5%

And add a asView() method to OUStringConstExpr,
to make it easier to pass to OUStringBuffer::insert

Change-Id: I115ec2398cfc8df39bd1efbbd5f0d5cc9712dba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125600
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 15:47:25 +01:00
Noel Grandin 0b46361ef8 tdf#133835 speedup calc autofilter (4)
Tweak INetURLObject::parseHost so it doesn't need its own
OUStringBuffer, and can just use the callers'
Saves 5%

Change-Id: I481fabd4272bc9f172dd751a7019090b95a65e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 10:26:52 +01:00
Noel Grandin 2aa7aa564f tdf#133835 speedup calc autofilter (3)
Tweak INetURLObject::parsePath to avoid an OUStringBuffer copy,
saves 5%

Change-Id: I49eff3443f34971b8ce15f4c1ab6c9395ee0690f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20 08:10:25 +01:00
Noel Grandin 23886b0e02 tdf#133835 speedup calc autofilter (2)
Tweak ImpEditEngine::SetRotation to avoid doing work when
nothing has changed, saves 10%

Change-Id: I10db2415278908e9e36491950a5f4826e01f42fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125564
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20 06:40:35 +01:00
Noel Grandin 66317d3aa5 tdf#133835 speedup calc autofilter (1)
avoid a copy in INetURLHistory::QueryUrl, saves 10%

Change-Id: I662a4e48f198e61f1cef52b1e920613bce9c9766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125563
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20 06:40:11 +01:00
Noel Grandin b692c8a280 small optimisation
avoid malloc in the common case

Change-Id: I3820065c2b070eddf7cfcba117ec1be73735957f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125562
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20 06:39:53 +01:00
Noel Grandin 7a61256f9e return XShape from SdrObject::getUnoShape
instead of XInterface, to make it obvious what the reality of the
requirement is

Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07 07:29:38 +01:00
Noel Grandin 14c7381438 ucb: webdav-curl: loplugin:unuseddefaultparam in ucb
[ port of commit 83911dd753 ]

Change-Id: I5a57b7af9cd231e89fc93cc1a5f277cae23a1427
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123279
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01 18:30:00 +01:00
Noel Grandin 95cc31f157 tdf#144513 improve perf when breaking long lines
use the clip rectangle to stop early when the text exceeds the height
of the cell

Change-Id: I63dadc5b63c1f6c0852e0ba86a58f18c2b207cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124221
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-26 18:16:02 +02:00
Noel Grandin 42da199753 more VS2022 integration
so it finds the v143 DLLs

Change-Id: I2bc8b37b681e68b04868cdfe704b2f085b4ea277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-14 13:35:48 +02:00
Noel Grandin 73c56d8c78 no need to allocate this on the heap
Change-Id: Ie4935dbf9e5a2a9e7906839b260706a12494b610
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122778
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28 18:26:03 +02:00
Noel Grandin 8156a8f879 no need to allocate SwFont separately in SwAttrHandler
Change-Id: I08ef59f48b1f986854c6d194fb856b2da73c2ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122775
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28 18:25:48 +02:00
Noel Grandin 2d45cef3cd no need to allocate SvxTabStopItem separately in SwLineInfo
Change-Id: Ia2cbf997427a2450a576436d7c0159b7bbe34578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122774
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28 18:25:33 +02:00
Noel Grandin b62153753a tdf#135683 speedup SwAttrHandler
we only care about the "highest priority" attribute, so we only
need to store a single attribute, not a whole vector worth.

Shaves 5% off the load time for me.

Change-Id: Ib7dc800db47502b33c69df0fe473a82bd8d93af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122773
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28 18:24:52 +02:00
Noel Grandin 33584bc189 tdf#144132 Crash when insert formula object in Writer
regression from
    commit ec01d43e0a
    Date:   Wed Jul 21 14:24:28 2021 +0200
    pass SfxChildWinFactory around by value

Change-Id: I88bc6c8bfd35d0a653512b064c9ee0d59b1e8b38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122520
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-23 14:57:04 +02:00
Noel Grandin 3372f93173 add some logging for intermittent windows jenkins crash
Change-Id: I8ad589dd8d0a64f75179d3330c80c9c43a21ff32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122155
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15 20:24:03 +02:00
Noel Grandin d467cd0dd9 tdf#135683 speedup DocumentRedlineManager::GetRedlinePos
use binary search

Change-Id: Icd442ba18cb27cdcb5955fa8bbce421b26d5ad44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121205
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-14 19:55:18 +02:00
Noel Grandin a9cd44f8de tdf#144052 speedup inserting large charts
we don't need to immediately re-order objects when setting the
Z-order, just set the dirty flag and we can calculate the proper order
layout.

This takes the time for the chart to appear from multiple minutes
to 20sec for me.

Change-Id: If80569da09469423f19f9fe82b40dfbdac14f161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121806
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09 13:01:23 +02:00
Noel Grandin 7b4b032daa reduce time in ResetEvent (tdf#144052)
Change-Id: I3e9c906a026e7455fb775d110eca32f8533614e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09 13:01:15 +02:00
Noel Grandin 3749d9af37 tdf#130795 use concurrent hashmap in SharedStringPool
we are loading a spreadsheet in parallel here, but the parallel threads
achievei very little actual concurrency because of heavy contention
in the SharedStringPool mutex.

So switch to a concurrent hash map. I looked at a couple of different
ones (including the Folly one), and this was the one with the simplest
resulting code.

This takes my load time from 12.5s to 8s

Change-Id: I04d6d8e11d613b510eb3bc981f3338819b7ac813
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121717
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09 09:06:45 +02:00
Noel Grandin e25ba7dc57 use a dummy clipboard when running unit tests
so the multiple unit tests don't stomp on each other.

This fixes a couple of things in my earlier attempt
(*) actually set the env variable on Windows
(*) don't use a global variable to test the env var, because that
variable might be initialised BEFORE the env var is actually set

Change-Id: Id43a1dd2fbd324691e0b6578c9026b8a523012e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01 20:42:40 +02:00
Noel Grandin bb5425ed3d tdf#135683 speed up writer layout cache access
can be hot, so use a std::unordered_map

Change-Id: I70e34e80cad67536414c71facbe0222dd88c65a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31 14:26:46 +02:00
Noel Grandin e3ea0e3265 tdf#135683 speed up large writer table load
no need to do this reregister check during import

Change-Id: I254ad24f1802e9cee51786ce5e3253d62c74829f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121207
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-29 09:33:52 +02:00
Noel Grandin 3b15eda58e no need for a vector here
Change-Id: Ie456abf9afeda887366b5be2f0161e3ec464e36e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121211
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-29 09:33:30 +02:00
Noel Grandin 0d25d7418d micro-opt: prevent some vector re-allocs
Change-Id: I183af9765f5afe6c552a83e8f4fd4d7edafe0427
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-29 08:50:42 +02:00
Noel Grandin 69e0567e11 tdf#135683 speed up layout of large writer tables
by making dynamic_cast to some SwTable* types faster

Change-Id: I5c5b2525ecfcdf3c0f648f32b4ccc21ba5ac40fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121193
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-28 15:13:01 +02:00
Noel Grandin 6b2046b417 reduce skia realloc when drawing polygons
Change-Id: Ide65945b2baa01b78c954112cdbf35edc41e2f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120916
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-24 11:28:07 +02:00
Noel Grandin f30c3ff66a speedup SkiaSalGraphicsImpl::drawPolyLine
no need to convert the line to a polypoly and then unwrap the polypoly,
just go straight to a poly

Change-Id: I3f0ccfb7ce557dc4c6cd67e6e66a0562609ce736
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22 16:22:57 +02:00
Noel Grandin 720e4258ab use Primitive2DDecompositionVisitor in ViewObjectContact (tdf#105575)
..to avoid container construction

Change-Id: Iae7a8ea8c31b6c8bcf4d161273be7b32fe41a021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120779
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20 12:43:48 +02:00
Noel Grandin 60485d5918 reduce skia re-alloc costs (tdf#105575)
by reserving space before building the SkPath

Change-Id: Ic01f614bf574fd3252d379ed38e3039cb0c56b18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19 12:02:48 +02:00
Noel Grandin 2e74c1107b use visitor callback to avoid container construction (tdf#105575)
Change-Id: I4dd3382ceca82f93664e66b32bcfa7c74eb58fdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120606
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18 21:17:19 +02:00
Noel Grandin f29ef71073 avoid constructing OUString on hot path (tdf#105575)
Change-Id: I7c9925fc7f68cdc9bd1a9c1834daabff09c8cf6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120604
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18 08:55:23 +02:00
Noel Grandin 889df64fbb reduce alloc costs for some basegfx objects (tdf#105575)
we can use a default object for the default constructo case, and
remove one malloc for each default constructed object

Change-Id: I0bec37ef9161a210973abb25669a9f16a5e0ea75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17 22:40:07 +02:00
Noel Grandin 58b2d04dda do less copying when constructing 2d sequence (tdf#105575)
instead of constructing a child sequence, and appending that
a parent sequence, just pass the parent sequence down the call
hierarchy, so we end up doing less copying.

Change-Id: If39a0779e543c6aa01f5e2e3ae63d395e0c85f7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120521
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16 21:40:14 +02:00
Noel Grandin d29eb3d715 no need to lookup window if cursor has not moved (tdf#105575)
use a single-item cache to avoid calling WindowFromPos

Change-Id: I0d42c9572d28363949e38f3e052973727a44fb4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120419
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 13:34:44 +02:00
Noel Grandin fa01f5a1fe tdf#105575 Slow rendering when using a Logo command
Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary

<quikee[m]> noelgrandin: nobody is using XPrimtive that is not
derived from BasePrimitive2D in an extension ... mainly as it is
not even possible

Change-Id: I68224021f0fbc35fe2a973198ba78d2b41ea172d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 12:49:00 +02:00
Noel Grandin 4d50939a7b tdf#136991 Open RTF with colored text
We spend most of the time in MergePortions, and the resorting is
a significant part of that, so only resort if we actually have to.

This shaves 10% off the load time for this document.

Change-Id: I2380c5aa744f6d9c82195bb2a17ced2ce7616e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120269
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-10 15:35:28 +02:00
Noel Grandin 0e883d6dbe display stack trace on assert for windows jenkins builds
Change-Id: I1c23fda56c013eeeaf4ad1099c164d6d1146f68b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02 13:52:15 +02:00
Noel Grandin 24b06b9c6b log access violation on windows tinderboxen
where we currently have no good feedback when something
goes wrong.

Credit: Exception printing code written by
  msdn-whiteknight
as seen at
  https://stackoverflow.com/questions/22467604/how-can-you-use-capturestackbacktrace-to-capture-the-exception-stack-not-the-ca

Change-Id: I44c65b10c0b0151c3236521d62a824570d4cdccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119561
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-28 18:34:08 +02:00
Noel Grandin cc948b84b8 exclude some tests for non-default DPI
Change-Id: I579a25040f42fd930a59079f430423806544752b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118222
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01 15:46:49 +02:00
Noel Grandin ecea9c42d5 fix failure in JunitTest_unotools_complex
Temp files created from OTempFileService are always opened with StreamMode::SHARE_DENYALL.
So normally you can't open them twice.

But the JunitTest_unotools_complex unit test used to work because it exploited a pessimisation in OTempFileService,
where that code would close the file when we read to the end.

Which meant that the unit test could open it again and read it.

However, in
    commit 218f36dd61
    Date:   Sun Jun 20 18:51:12 2021 +0200
    tdf#135316 remove OTempFileService pessimisation
I removed that pessimisation.

So make the share mode a little more permissive.

Change-Id: I297a5c9c0505816b399fad29414077d03231ec72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30 11:30:49 +02:00
Noel Grandin 9815bf197c tdf#135316 add SvFileStream::SetDontFlushOnClose
if we're going to be deleting a temporary file, there is no point
flushing it on close, which has a measureable cost

This takes my load time from  17s to 16s

Change-Id: I2fce7eeaf0ce9fef826b4ce9a1a4d4c8114cac76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-23 14:29:57 +02:00
Noel Grandin a1cb4c7665 reduce allocation in ZipContentInfo map
This is a small struct, no sense in allocating it separately

Change-Id: I709daebbde648a79f175f74c207bdf4871ae6ff1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117604
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22 15:13:05 +02:00
Noel Grandin c0643239a5 no need to make copies of these map entries
Change-Id: Ie65cbacd2806a2c030b682f8cfd473676c4f95c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117605
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22 10:23:49 +02:00
Noel Grandin 990b2cb056 simplify and improve Wildcard
it is faster to just process OUString data, rather than perform
expensive conversion to OString and back again.

Change-Id: Ie007b872ee507ac5c6e8b55cc0a49ef3ac1f0139
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117608
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-22 08:41:58 +02:00
Noel Grandin 218f36dd61 tdf#135316 remove OTempFileService pessimisation
Closing the temp file when we read to the end, and then opening
it again later actually is quite expensive, just leave it open.

This takes my load time from 22s to 19s

Also clean up the unit-test that failed, so that I can get
a useful stack trace out of it when something fails,
specifically
(*) throw an exception when something goes wrong, instead
of just writing a message to stdout
(*) don't catch exceptions and write useless messages - just
let the exception flow up to the JUnit handler, which will log
a nice stacktrace with line numbers.

Change-Id: If55c997f91eea4e703e92c632961d68b3453076d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21 18:37:04 +02:00
Noel Grandin 2e3046cc6f simplify bootstrap_map (tdf#135316 related)
No need for this indirection

Change-Id: I87c90c9f1a7904f5a506acac631fe5a1f52f9190
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117521
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21 08:47:52 +02:00
Noel Grandin ecbdb403d1 tdf#135316 docx open performance, cache next character style name
so we don't have to scan the list repeatedly, which is O(n^2)

This takes my load time from 37s to 22s

Change-Id: I0df2f2ace82f5cd6287c7ded796b02c5242269ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117396
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17 20:44:22 +02:00
Noel Grandin 0771ac00ac use string_view in the Translate API
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17 14:32:11 +02:00
Noel Grandin e52bbca626 tdf#135316 docx open performance
avoid unnecessary SwNumFormat creation

Change-Id: I62a16fdeb1225606a54f384e5196e5137e8d2139
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117271
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-16 15:15:32 +02:00
Noel Grandin 9966345f4f tdf#135316 docx open performance
don't translate back and forth between two representations in
SwPoolFormatList
Shaves 2% off load time.wq

Change-Id: I098c15b92d5bc89fe1631edaed6827931cde5895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-15 13:12:31 +02:00
Noel Grandin ed1ef5f0aa remove some redundant lookups
Change-Id: I4668087a0a6373049b29db6f2ffb770023c58c64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117211
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-15 11:18:37 +02:00
Noel Grandin 2bccb7e67b remove some unnecessary LanguageType copies
Change-Id: Iec4374627c931ccecf05a712682ed18ef90bf359
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-15 10:21:58 +02:00
Noel Grandin cb7bf2ce16 VisualStudio 16.10 doesn't like this construction
Change-Id: Idfef618b43735c48c9132d2fb932bc3bcb2ffe9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-27 18:52:04 +02:00
Noel Grandin 3669d4ec43 add OString::getTokenView (tdf#42374 related)
small improvement to PDF import

no need to construct temporary string objects when we are just to
going to convert them into int/double.
So use a view and convert the data through the view.

Change-Id: I824fe88bf17142b48fe6032e10c0f3a111927e96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-15 11:21:59 +02:00
Noel Grandin de5af8315e improve perf of xmlreader::Pad
Change-Id: I83cc88977e7c287b0f428a3e01f289179b6dbad9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115353
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-11 11:53:45 +02:00
Noel Grandin 1820db8149 speed up SfxExtItemPropertySetInfo
Change-Id: I7fdf0395c40f1932cfa1fc6ada91accc1912851a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115352
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10 21:19:13 +02:00
Noel Grandin e368cc61fa reduce cost of locking in SvtModuleOptions
Change-Id: If9e0c275822b733d339845d16edfbc5942b4aa6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10 20:20:28 +02:00
Noel Grandin 30312222e5 speed up saving large ODS a little
by looping over the sections only once, and
moving the vector containing the borders outside
the loop.

Change-Id: Icf68ced94aa45a4737fb7d5a3fe076ab2931034e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115059
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-04 16:14:03 +02:00
Noel Grandin ffde7949ab tdf#79049 speed up OOXML workbook load (5)
Sc::NumUtil::isLatinScript is pretty hot, so add a small
cache to ScDocumentImport.

This takes my load time from 27s to 18s.

Change-Id: I51fa891836d678f0d8700653e3a3a095297aeae7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114987
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02 11:59:53 +02:00
Noel Grandin 86b345a963 tdf#79049 speed up OOXML workbook load (4)
Optimise LocaleDataWrapper for reads by initialising the
data we in the constructor, so we don't need any kind of
locking

Reduces load time from 34s to 28s.

Change-Id: I4bd3bddb30b70ba015fe5b1372534f9507762b74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114960
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02 10:00:43 +02:00
Noel Grandin 61386aa03c tdf#79049 speed up OOXML workbook load (3)
Exit this loop early if we aren't going to make progress
anyhow.
This takes the load time from 40s to 34s for me.

Change-Id: I31887442cde6e3fc05f1fce10bb3dde9c2b88bf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114942
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-30 21:41:13 +02:00
Noel Grandin deac5c8473 tdf#79049 speed up OOXML workbook load (2)
the allocation of memory and pointer chasing was
slowing things down in the styles conversion.
So switch to more cache-dense data structure,
and re-arrange the loops to be more cache friendly.

The takes the time from 1m9 to 40s for me.

Change-Id: I876580adc7823313b0cdb067f2f6b3e61c39ecf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114941
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-30 21:39:51 +02:00
Noel Grandin 857caa5fc6 tdf#79049 speed up OOXML workbook load
we spend a lot of time in ScAttrArray::GetLastVisibleAttr
which appears to be very expensive for this worksheet.

This is re-computed every time we enter SfxBaseModel::getArgs

Reduce the recomputation by introducing a new method which
only retrieves specific SfxBaseModel arguments.

This takes the load time from 5m9 to 1m9 for me.

Change-Id: I605fae0faa94760c7d6993877c9559ea5dc813cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-30 16:03:35 +02:00
Noel Grandin ddd2639a48 drop mask from BitmapEx
So that we have fewer cases to deal with when we transition to
32-bit bitmaps.

(*) rename maMask to maAlphaMask, since now it is only being used
for alpha duties.
(*) drop mbAlpha and mbTransparent to simplify state management,
the only thing we need to check for alpha is if maAlphaMask is
non-empty.

Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-26 12:51:58 +02:00
Noel Grandin bca539e889 make OString(OStringLiteral) constructor constexpr
i.e. a copy of
   commit 21584b304b
   make OUString(OUStringLiteral) constructor constexpr

Change-Id: If5b0c2b896f8a730d01a076d3eb9161ad628979b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114480
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22 18:38:34 +02:00
Noel Grandin 4bb0afe359 remove dead code from WinSalBitmap::Create
Change-Id: I345bfba23d6041a631664f5e1dbbe27cd8ba0290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114271
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19 18:39:00 +02:00
Noel Grandin 09a8019151 nobody uses RLE display hardware anymore
Change-Id: I07aa5b24425007ac82fedb28d3c4f0ad474dca14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19 18:38:28 +02:00
Noel Grandin 481b3bb669 flatten some code
Change-Id: I1b3148b1330b3713b1f158bf15c3e247c6982928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19 18:38:09 +02:00
Noel Grandin 61462eff26 use OUString in dir handling operations
which simplifies things nicely

Change-Id: I1bcc1dae9a7f2e4bbadfacff1332b7453c0c29b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114131
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-17 08:41:12 +02:00
Noel Grandin 8b127d938d flatten some code in sal/osl/w32
Change-Id: Ibff36560f0fc49155dc5e8fe587b8f3a41e79516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114201
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-16 14:50:28 +02:00
Noel Grandin e36c2b4698 set path to fully normalized in osl_getNextFileItem
which speeds up startup, because then we don't need to do the
GetCaseCorrect stuff when scanning large folders of fonts.

Change-Id: Ic7c08e8c631184ba619241ef337c526994efe571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114127
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-16 08:59:40 +02:00
Noel Grandin 94afb3663b reduce allocation in TextListStyle some more
These child objects do not need to use shared_ptr, since no-one
else holds a pointer to them, and we always allocate them, so
just allocate them inline the parent object.

Change-Id: I96ab644a3a2f1e962df02d590c6a9944ef4a9ce3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14 18:32:26 +02:00
Noel Grandin 306f6934ac reduce allocation in TextListStyle
Change-Id: Id1bad0bf39b03bc6d4004c50c0f35b60d6753aa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114084
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14 17:04:52 +02:00
Noel Grandin 0e18d4495b flatten PropertyChangeNotifier
which removes an allocation hotspot when loading lots of shapes

Change-Id: I0121f5bc86c6dfeddcad13e81203a514151d61bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114051
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13 20:55:01 +02:00
Noel Grandin 19fb87c8a1 avoid a few string allocations
by moving the buffer creation to only when we actually need it

Change-Id: If5efefdc90452f0e98227f12cb1314732f785606
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114047
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13 18:41:42 +02:00
Noel Grandin 64152322b9 tdf#130326 speed up row height calculated
for scaled rows. Teach the ForwardIterator to use the slightly
faster normal search, and make getRangeData cache the resulting
iterator even when doing a tree search. The combination of
tree search for the first item, and then using a cached iterator
to step through the row data is fairly fast.

Take my load time from 23s to 22.3s

Change-Id: Icd1aa3d3a8022a073b125dfc05a670b75da1837e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114045
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13 16:00:28 +02:00
Noel Grandin f6d1da91cc tdf#130326 no need to fill ScMatrix with zeros here
when we are about to overwrite the data anyway.
Takes my load time from 24s ro 23s.

The important change (for this test file) is in
    ScInterpreter::ScAmpersand
but I changed all the other places that have the
same problem.

Change-Id: I95b8ac3b2c10a8b638551e13f6f582e793058833
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13 14:04:10 +02:00
Noel Grandin 26fc87c682 make SfxItemPropertySimpleEntry constructor explicit
Change-Id: I09d6045320b44746fbdb103db884c214e0509a78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114012
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12 20:28:32 +02:00
Noel Grandin fe23e35ba5 less copying in SfxItemPropertyMap::getPropertyEntries
we can just expose the map now, and avoid copying all the properties

Change-Id: Icb22975508582268dfa96e41eb98ac01e7f51317
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113982
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12 17:45:19 +02:00
Noel Grandin 40f9888ddc tdf#130326 flatten SfxItemPropertyMap
which shaves 2% off load time here since we construct a boatload
of these

Change-Id: I7a57447026f3a1bd6a31f10adf15bee2d1d17c8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12 12:31:11 +02:00