8519677a24
fix potentially crash-inducing race condition by removing event loops' x-thread channel from an event loop when it is destroyed
2016-10-17 14:48:15 -04:00
816f3bfb36
Use std::vector::reserve to improve performance of adding properties
...
The number of properties per node roughly corresponds to the number of members
of the class the node is representing and should be fairly low.
Use std::vector::reserve to prevent reallocation on insert for most node types,
there are exceptions like Region(~40 properties).
This seems worth it as part(maybe 1/10th of the total time) of saving a Session
is a combination of what occurs in "Create" and "Write" in this test.
Perf results before changes:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 30610 Max: 42656 Total: 376672 Avg: 37667 (37 msecs)
Write : Count: 10 Min: 42804 Max: 54277 Total: 460455 Avg: 46045 (46 msecs)
Read : Count: 10 Min: 70364 Max: 85484 Total: 750909 Avg: 75090 (75 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 164360 Max: 356995 Total: 3064482 Avg: 306448 (306 msecs)
Write : Count: 10 Min: 308655 Max: 372953 Total: 3226707 Avg: 322670 (322 msecs)
Read : Count: 10 Min: 517243 Max: 541839 Total: 5289950 Avg: 528995 (528 msecs)
Perf results after changes:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 30375 Max: 48253 Total: 431727 Avg: 43172 (43 msecs)
Write : Count: 10 Min: 42553 Max: 49163 Total: 453353 Avg: 45335 (45 msecs)
Read : Count: 10 Min: 70307 Max: 75987 Total: 734923 Avg: 73492 (73 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 154486 Max: 307856 Total: 2678989 Avg: 267898 (267 msecs)
Write : Count: 10 Min: 304273 Max: 343274 Total: 3169158 Avg: 316915 (316 msecs)
Read : Count: 10 Min: 496920 Max: 541394 Total: 5260410 Avg: 526041 (526 msecs)
2016-10-10 08:45:34 +10:00
e84fbfe6e5
Remove PropertyMap from XMLNode class
...
It appears that there is no performance benefit from storing properties in a
map for faster lookup or it is counteracted by the penalty of storing and
maintaining the additional data structure.
Timing results before changes with an optimized build:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 41293 Max: 63746 Total: 564448 Avg: 56444 (56 msecs)
Write : Count: 10 Min: 42932 Max: 49221 Total: 453955 Avg: 45395 (45 msecs)
Read : Count: 10 Min: 80160 Max: 84678 Total: 824506 Avg: 82450 (82 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 228759 Max: 420236 Total: 3587597 Avg: 358759 (358 msecs)
Write : Count: 10 Min: 307095 Max: 348767 Total: 3205704 Avg: 320570 (320 msecs)
Read : Count: 10 Min: 572400 Max: 657219 Total: 5959630 Avg: 595963 (595 msecs)
Perf results after changes:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 30610 Max: 42656 Total: 376672 Avg: 37667 (37 msecs)
Write : Count: 10 Min: 42804 Max: 54277 Total: 460455 Avg: 46045 (46 msecs)
Read : Count: 10 Min: 70364 Max: 85484 Total: 750909 Avg: 75090 (75 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 164360 Max: 356995 Total: 3064482 Avg: 306448 (306 msecs)
Write : Count: 10 Min: 308655 Max: 372953 Total: 3226707 Avg: 322670 (322 msecs)
Read : Count: 10 Min: 517243 Max: 541839 Total: 5289950 Avg: 528995 (528 msecs)
2016-10-10 08:45:34 +10:00
97752e6a51
Use references rather than copying containers in libpbd xml code
...
It is slightly surprising but there seems to be little difference to
performance with these changes. Possibly a slight improvement in "Create" test
with a large xml document(~5%).
Timing results before these changes with an optimized build using new XML perf tests:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 38656 Max: 63827 Total: 571228 Avg: 57122 (57 msecs)
Write : Count: 10 Min: 43594 Max: 49279 Total: 459907 Avg: 45990 (45 msecs)
Read : Count: 10 Min: 80247 Max: 84912 Total: 827207 Avg: 82720 (82 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 230706 Max: 456054 Total: 3850998 Avg: 385099 (385 msecs)
Write : Count: 10 Min: 312322 Max: 353789 Total: 3264211 Avg: 326421 (326 msecs)
Read : Count: 10 Min: 573556 Max: 610865 Total: 5951908 Avg: 595190 (595 msecs)
Timing results after these changes:
XMLTest::testPerfMediumXMLDocumentTiming
Create : Count: 10 Min: 41293 Max: 63746 Total: 564448 Avg: 56444 (56 msecs)
Write : Count: 10 Min: 42932 Max: 49221 Total: 453955 Avg: 45395 (45 msecs)
Read : Count: 10 Min: 80160 Max: 84678 Total: 824506 Avg: 82450 (82 msecs)
XMLTest::testPerfLargeXMLDocumentTiming
Create : Count: 10 Min: 228759 Max: 420236 Total: 3587597 Avg: 358759 (358 msecs)
Write : Count: 10 Min: 307095 Max: 348767 Total: 3205704 Avg: 320570 (320 msecs)
Read : Count: 10 Min: 572400 Max: 657219 Total: 5959630 Avg: 595963 (595 msecs)
2016-10-10 08:45:34 +10:00
a4b65212c9
Add test of pbd/xml++.h API performance with three file sizes
...
Generate, write and then read three Session like XML files to test the
performance of changes made to pbd/xml++.h API
2016-10-10 08:45:34 +10:00
4b2987d0f2
Add XMLNode::operator==/!=() for comparing XMLNode instances
...
Implemented to be able to test that when writing an XML document via XMLTree
and then reading back into another XMLTree the structure is equivalent as a
general API test of pbd/xml++.h to check for breakage when changing
implementation.
2016-10-10 08:45:34 +10:00
734a4c10e4
Change position of average in PBD::timing_summary and add msecs
2016-10-10 08:45:34 +10:00
116dace033
Add PBD::Timing::elapsed_msecs() as convenience API
2016-10-10 08:45:33 +10:00
Kamil Rytarowski
e426f0777a
NetBSD ships with backtrace(3) in libexecinfo
2016-10-04 22:18:52 +02:00
Kamil Rytarowski
9d3077bd03
NetBSD uses statvfs for the functionality of statfs on Linux
2016-10-04 22:18:23 +02:00
b6c80153c3
add API to create [tar.xz] archives
2016-09-19 11:33:07 +02:00
02b7db03bd
PBD::canonical_path will no longer throw so change test
2016-09-19 15:55:39 +10:00
569167a603
Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for Windows
...
This fixes the libpbd testCanonicalPathUTF8 and libardour
open_session_utf8_path unit tests
You can now have Sessions with localized names containing characters that
aren't in the system codepage on Windows.
It also fixes the issue where a Session would not open when it was moved into a
path with characters that aren't in the system codepage.
The only use case for calling canonical_path/realpath on the session path
AFAICT is for resolving relative paths that are passed via the command
line/terminal. I'm doubtful that works correctly on Windows because of
character encoding issues with the current API we use for that(not glib), so it
is slightly ironic that this issue was caused by an incorrect implementation of
a function that is not really necessary on Windows at this point in time.
2016-09-19 14:47:52 +10:00
9192a2e969
Add test for PBD::canonical_path on Windows using utf8 strings
...
This currently fails because the windows only realpath implementation in
pbd/pathexpand.cc, which is called from PBD::canonical_path to resolve the path
uses Glib::locale_from/to_utf8. As I demonstrated in the
testOpenFileUTF8Filename test case Glib::locale_from/to_utf8 are not the
correct functions to use for this use case as it converts to/from utf-8 to the
locale's current character encoding. On Windows this is most often a single
byte encoding such as Windows-1252 and conversion will fail if the path
contains any characters that are not in system codepage.
2016-09-19 14:47:52 +10:00
aa77c2eb58
Give the Windows MMTimer test a better chance of passing
...
The default scheduling on windows seems fairly erratic or is at least in the
VM that I'm running these tests on, so increase the timing slack a bit so the
test has a better chance of passing. It is still quite easy for it to fail
though, especially if you for instance manipulate the terminal window somehow
while running the tests but it does not really matter in any case as this test
serves its purpose in testing the PBD::MMTimers API.
2016-09-19 14:47:52 +10:00
e9e412b989
Modify our MSVC project to use the newly introduced 'libarchive' library (libpbd)
2016-09-15 14:39:38 +01:00
77bd398153
implement file-[un]archive progress report
2016-09-14 23:10:41 +02:00
53ee3e2e72
Add support for built-in file/url unzip/untar
...
This introduces new build-dependency: libarchive
(http://www.libarchive.org/ )
2016-09-13 16:14:40 +02:00
0ff233d234
Update our MSVC project files to generate the most recent Ardour session file format (ver 5) rather than the older v3 format
2016-08-30 07:15:00 +01:00
8e2d1c7f2a
Move 'round()' / 'trunc()' etc so that they won't conflict with any versions already available in MSVC
2016-08-19 14:11:01 +01:00
a0b117b948
'roundf()' wasn't introduced in MSVC until VS2013 - so for the time being, let's emulate it using 'floorf()'
2016-08-19 14:11:00 +01:00
09ed9c44e7
change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe
2016-08-14 08:33:23 -04:00
eec294a97e
the endless quest to plug memory leaks -- episode 378
2016-07-25 17:16:32 +02:00
0fd2d82a6d
add missing header include
2016-07-19 20:33:36 +02:00
c1aef0084a
tweak realloc-pool realloc behavior.
...
* ignore provided old-size from lua, use internal segment size.
* fix behavior on OOM (leave memory untouched)
2016-07-19 15:05:16 +02:00
d13435a4e1
re-add TLSF
2016-07-19 15:03:51 +02:00
ee2d7a2d0c
add exception handling in LocaleGuard, to try to cover more OS X wierd/corner cases
2016-07-18 10:56:43 -04:00
defb46d0fd
Add a newly introduced source file to our MSVC project (libpbd)
2016-07-18 09:39:36 +01:00
82828bd7a6
prevent duplicate symbols (fix OSX compilation)
2016-07-14 23:11:11 +02:00
cf52d6e4b4
enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
2016-07-14 14:45:23 -04:00
58657edfb3
redesign PBD::LocaleGuard to work correctly (i.e. not break translations)
2016-07-14 11:37:48 -04:00
311a5f1462
add a natural sort algorithm
2016-07-14 16:52:43 +02:00
8de675d699
fix simple but fatal mistake in defining PBD::Controllable::Flags enums.
...
This error caused the flags to be saved as an empty string, thus losing all state when the session is reloaded
2016-07-12 08:34:35 -04:00
7dfd39e708
add a single-element ring-buffer write function
2016-07-10 15:56:18 +02:00
58b2931685
add the potential for a bit more debugging of signal connects
2016-07-01 17:47:05 -04:00
ba700ecc63
add the potential for a bit more debugging of signal connects
2016-07-01 17:47:05 -04:00
86763cba90
Enable build for FreeBSD (part 1/2)
...
Adopted from Michael Beer -- GH pull-request #232 with minor changes:
* rebased on master,
* removed trailing whitespace,
* don't explicitly change saved configuration defaults (wscript)
* moved sys/wait (WNOHANG) to header include
* separate changes in GUI and lib
2016-06-26 16:43:07 +02:00
f592b6c07b
Accommodate recently removed source(s) in our MSVC project (libpbd)
2016-06-01 14:30:26 +01:00
d5127001bb
move ControllableDescriptor from libpbd to libardour; add support for describing VCAs
2016-05-31 15:30:42 -04:00
e1bcd70712
a slew of as-yet incomplete work to get VCA solo+mute closer to working
2016-05-31 15:30:40 -04:00
0cf89e76ef
add new enums
2016-05-31 15:30:40 -04:00
2c6d595614
add a new Controllable::NotAutomable flag
2016-05-31 15:30:40 -04:00
653ae4acd6
universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
...
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
5531c83496
change API of Controllable::Changed signal to include (from_self, GroupControlDisposition)
...
This allows the signal to convey more information, which may be required by some handlers of a control's Changed signal
2016-05-31 15:30:40 -04:00
984f4487e0
remove debug output
2016-05-31 15:30:38 -04:00
4d14ae4e23
mostly restore VCA state on session loading.
...
This does not restore VCA assignments
2016-05-31 15:30:38 -04:00
22e031135a
Emulate 'log1p()' and 'expm1()' using 'log()' and 'exp()'
...
(for MSVC which didn't implement those functions until very recent versions).
2016-05-28 19:07:22 +01:00
b0200b23f2
Accommodate the fact that 'msvc_resources.rc.in' got moved to a new path
2016-05-21 10:33:18 +01:00
6d343ba3c6
fix LocaleGuard contstructor ( 3dc77280
)
2016-05-07 12:19:41 +02:00
f445ba8bdc
locale debugging
2016-05-07 12:15:12 +02:00