Page 1 of 1

[SOLVED] Improve the Media Library speed

Posted: Mon Jul 04, 2016 6:55 am
by Sami32
I was reading that http://java-performance.info/base64-enc ... rformance/ while trying to diagnotic an issue.

Since we can see that Java 8 native Base64 implementation is very fast, so will be the embedded CoverArt/AlbumArt (ID3 Tag) process before include them into the database if we use it.

Maybe you did it already, or it is too complicated to maintain a Java 8 version different from Java 7 ?
Just an idea :roll:

Re: Make the Media Library faster with Java 8

Posted: Mon Jul 04, 2016 8:38 pm
by squadjot
Are you looking for a J8 version of UMS?
http://www.fosshub.com/Universal-Media- ... -Java8.exe

Re: Make the Media Library faster with Java 8

Posted: Mon Jul 04, 2016 10:38 pm
by Sami32
No.
Just asking if

Code: Select all

java.util.Base64
class was used in Java 8 version, and if it will sound reasonnable to implement it for a faster Media Library (when it contain many Cover Art/Album Art ID3 Tags), since for now i saw that Apache Commons-Codec was used :

Code: Select all

import org.apache.commons.codec.binary.Base64;
Name | Decode, 200000000 bytes
JavaXmlImpl | 0.885 sec
Java8Impl | 0.887 sec
MiGBase64Impl | 1.928 sec
IHarderImpl | 2.431 sec
ApacheImpl | 2.552 sec
GuavaImpl | 3.744 sec
SunImpl | 4.096 sec
So, if we believe this comparison test from 2014, we can make it around 3 times faster.

P.S. Sorry for not being clear in my first post.

Re: Improve the Media Library speed ?

Posted: Tue Jul 05, 2016 8:36 am
by SubJunk
It's worth looking into, thanks for pointing it out :)

Re: Improve the Media Library speed ?

Posted: Wed Jul 06, 2016 6:10 am
by erick diangilis
hi guys how are you doing? i know its my question has different subject in matter but since you understand more about programming java and things like this i found this java 9 update 125 early acess on the oracle website i would like to try but the even the lastest ums 6.4.1 snapshot that i've got doesn't work with it is there a possibility in a future version to have a compatibility or its too early to use because its not officialy released yet and its not in its full form to make a ums compatible with java 9? ;)



thanks for the atention and have a good day ;)

Re: Improve the Media Library speed ?

Posted: Thu Jul 07, 2016 10:41 pm
by valib
Sami32 do you mean somethink like this?

Code: Select all

...
import java.util.Base64;
...

...
value = MI.Get(general, 0, "Cover_Data");
				if (!value.isEmpty()) {
					media.setThumb(Base64.getDecoder().decode(value));
				}
...

Re: Improve the Media Library speed ?

Posted: Sat Jul 09, 2016 4:27 am
by Sami32
Valib Yes, exactly what i was thinking about, your skill make it easy ;-)
I am better for looking at, trying to understand, that coding it :lol:

P.S. Thanks to Valib for this implementation 8-)