Commit 44657bf5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

VLCMetadataService: Use 2 threads on desktop platforms

parent d3e4e8db
Pipeline #126456 failed with stage
in 3 minutes and 29 seconds
......@@ -41,6 +41,10 @@
# include "utils/File.h"
#endif
#if __APPLE__
# include <TargetConditionals.h>
#endif
namespace medialibrary
{
namespace parser
......@@ -177,7 +181,18 @@ const char* VLCMetadataService::name() const
uint8_t VLCMetadataService::nbThreads() const
{
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IPHONE)
/* Don't use multiple threads for this on mobile platforms (for now at least) */
return 1;
#else
/*
* Stick to 2 threads for now until we bench more. Early tests seem to
* indicate that going from 2 threads to 4 doesn't improve much for small
* files (usually audio) and decreases the performances a bit for larger
* files (usually video)
*/
return 2;
#endif
}
void VLCMetadataService::onFlushing()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment