WSH Biography Text, Album Info, Picture. www.last.fm
language - left mouse double click on the text (or main menu or menu properties to set);
font size - shif + mouse wheel on the text;
move text - press left mouse button on the text and move;
previous, next img. - mouse wheel on the img;
selsect artist or album img. - left mouse double click on the img (order by most popular or release date - menu);
img. interval setting - shift + mouse wheel on the img;
Thank you @kgena_ua :)
Thank you , always use your script!
glad to be useful
а можно скрипт паправит так, штоб с начала брал инфо с поля REMIXED BY, а потом (если инфо нет) уже с ALBUM ARTIST ?
мне как то правилнее если у песни дапустим ABBA (remix от TIESTO) паказывал дискографию TIESTO
а можно скрипт паправит так, штоб с начала брал инфо с поля REMIXED BY, а потом (если инфо нет) уже с ALBUM ARTIST ?
мне как то правилнее если у песни дапустим ABBA (remix от TIESTO) паказывал дискографию TIESTO
Violation TOS #10 (https://hydrogenaud.io/index.php/topic,3974.html#post_tos10). You must post in English.
sorry, can you delete my message (i translate with google) ?
Is it possible to adjust the script so that at the beginning it will be taken info from the REMIXED field, then (if there is no information) from the ALBUM ARTIST field?
It seems to me more logical, for example: the song ABBA remixed TIESTO, so better that the TIESTO discography is displayed.
THANK YOU for answer.
Biography, Albums, Similar artist info. www.last.fm
version 06102017
language - left mouse (or left mouse + Shift) double click on the text (main menu or menu properties to set);
font size - Shif + mouse wheel on the text or text header (menu properties to set);
move text - press left mouse button on the text and move;
hide text - mouse mbtn dblclk on the text header;
previous, next img. - mouse wheel on the img;
select artist, albums or similar artisr info - left mouse double click on the img (main menu);
img. interval setting - Shift + mouse wheel on the img;
for advanced settings see menu properties.
The script is not compatible with the previous version, saved data must be deleted/
thanks, super :)
Thank you. Works perfect.
@kgena_ua can't get album-review
(old bio-tool gets album-review)
language: english
changed to album: most popular or release date - nothing found
i'm using foo_jscript-panel 1.3.0 and
your tool 06102917
please have a look at it,
thx
@lender1257,
I think you have not deleted the old data from the folder " ...\tmp_Biography".
(do not delete folder "_download")
this is a complete fresh installation of your tool
my settings:
http://de.tinypic.com/r/2450im8/9
http://de.tinypic.com/r/30x9bns/9
I'll check it at home
hi
can you please also implement a remap-field for %artist%?
owing to different spellings
thx
@lender1257
I do not even know. I checked it with foo_jscript_panel-v1.3.0.
Works good
https://www.youtube.com/edit?o=U&video_id=0ChIIlRaiXE (https://www.youtube.com/edit?o=U&video_id=0ChIIlRaiXE)
hi
thanks for checking.
in the video your script shows in line 1811 "var btn=WshShell ... Foobar 2000 ..."
in my downloaded script (version: 06102017 feature: v1.4) there isn't such a line
my script ends with line 1786
if i change to "similar artists" always "text not found"
any idea what i have done wrong or did i grab the wrong sript ?
@kgena_ua error found; it was my mistake, changed parameter "download limit" to zero
i thought concerned pics only
script works
feature request: album-review of playing %album%
remap-field %artist%
thx
in the video your script shows in line 1811 "var btn=WshShell ... Foobar 2000 ..."
in my downloaded script (version: 06102017 feature: v1.4) there isn't such a line
my script ends with line 1786
All right, the script ends on line 1786.
I additionally wrote a function for deleting empty folders and testing it now.
hi
are you planning to expand your script like wrote in post #18 ?
@lender1257,
You mean to add a search for an %artist% - %album% that is playing or currently selected
hi
kgena_ua
yeah, double-click on panel changes from "bio %artist%" to "album-review %artist% + %album%" and reverse.
if not possible, then an extra script
first, a way to overwrite %artist% (remap %artist%) would be very good. with this you could correct different spellings.
thx
Hi
kgena_ua,
Thank you very much. I have used this script,It is very helpful to get the music's information.
But it has some little problems:
1)It omit some special charactors,like as "*,/,.". It will be much better to change these charactors to '_'.
2) It cann't fetch the playing music's album cover.(Not the artist's pop album)
3) When you change the music quckily,it will get wrong images.(settings:prefer now plaing)
4) It will be much better if it can set these parameters: the dowloaded image path(default: tmp_Biography) ; the artist's images's suffix(_?_images);the album's images(eg.: $if(%album artist%,%album artist% - %album%,%filename_ext%)
Could you please fix these problems? I find this script is the best than others so far.
:))
Have a good day!
@kgena_ua
really great script !!!
if you include "album review" in the context menu, please change in properties,"default img path" to "default img path bio" and allow a new path for "album review" (default img path album review).
so that 2 different images can be displayed if nothing is found.
thx
@kgena_ua
really great script !!!
if you include "album review" in the context menu, please change in properties,"default img path" to "default img path bio" and allow a new path for "album review" (default img path album review).
so that 2 different images can be displayed if nothing is found.
thx
lender1257, thanks.
I'm thinking about reviewing the album. The idea is interesting.
My problem is my English. Basically, I understand, but the subtleties
@kgena_ua i've sent you a mail
There were some changes on the LastFM website.
Biography & Albums & Similar artist info. www.last.fm
version "15122017
for wsh panel mod and jscript panel
language - left mouse (or left mouse + Shift) double click on the text (main menu or menu properties to set - select en,it,zh,de,pl,pt,ru,tr,fr,sv,ja);
font size - Shif + mouse wheel on the text or text header (menu properties to set);
move text - press left mouse button on the text and move;
hide text - mouse mbtn dblclk on the text header;
previous, next img. - mouse wheel on the img;
select artist, albums or similar artisr info - left mouse double click on the img (main menu);
img. interval setting - Shift + mouse wheel on the img;
for advanced settings see menu properties;
added: background transparency under the text - Ctrl + mouse wheel on the text.
over all wishes I work
@kgena_ua hi
version 171215 crashes on both panels (jscript + wsh)
(http://[IMG]http://i63.tinypic.com/210x348.jpg)[/img]
no one else has this problem?
Am I doing something wrong?
no one else has this problem?
Am I doing something wrong?
Hi.
Unable to create folder "tmp_Biography" - permision denied.
hi kgena_ua
no chance to get version 15.12.2017 running
updating from old to new script --> crash
new installation:
i have deleted jscript- and wsh-panel totally; deleted tmp_Biography
inserted jscript-panel new with script from 15.12.2017 --> crash, same error as described.
when i delete tmp_biography and i start foobar without playing music (stop), tmp_biography and the bio of the last played %artist% will be allocated automatically.
hope you can help
@kgena_ua i have found an error in your script 15.12.2017
changed it, and now new version is doing fine
changed red marked field from old to new
@kgena_ua another crash with version 15.12.2017
field "priny" not defined; line 1613 - at a change of the %artist%
could it be that this should be "print" ???
please have a look on it
thanks
@kgena_ua
please have a look on it
thanks
lender1257, this is not a mistake, it's my inattention. Thanks.
hi kgena-ua
I assume it's print. (I don't know this programming language.)
I like your script very much.
what i'm missing is a remap-field for %artist% in properties.
this field should be very long and fillable with titleformatting script. so that every user can enter what he wants.
I myself have almost 800 different %artist% and last-fm doesn't always save as I do it.
the result should then be used to search as %artist%.
I hope you can make this possible. then the script would be perfect, for me.
best regards
@kgena_ua another please:
please include a refresh-function in your script. (delete folder and new download)
to fix download-errors
thanks
"Biography & Albums & Similar artist info. www.last.fm"
version "18022018"
Added: review of playing or selected album.
language - left mouse (or left mouse + Shift) double click on the text (main menu to set);
font size - Shif + mouse wheel on the text or text header (menu properties to set);
move text - press left mouse button on the text and move;
hide text - mouse mbtn dblclk on the text header;
previous, next img. - mouse wheel on the img;
select artist, albums (most popular and release date), similar artisr or album info - left mouse double click on the img (main menu);
img. interval setting - Shift + mouse wheel on the img;
for advanced settings see menu properties;
background transparency under the text - Ctrl + mouse wheel on the text.
The script is not compatible with the previous version, saved data must be deleted.
hi kgena_ua
really great work; all works perfect
thanks
are you planning to install the other features i've posted ?
this is for you - for great work
this is for you
Thank.
what i'm missing is a remap-field for %artist% in properties.
this field should be very long and fillable with titleformatting script. so that every user can enter what he wants.........
if I understand correctly you want to be able to, for example through a dialog box, enter the name of the artist.
hi
1) maybe in properties a new line named "remap artist". (very large)
in this field i will enter with titleformatting script, all changes of my %artist%-tags, so last.fm will find the text.
if "remap-field" not is space search with this new "remap-field" as %artist%, in all other cases with %artist%.
for example:
$if($or($strcmp(%artist%,'ALLMAN BROTHERS BAND'),$strcmp(%artist%,'ALAN PARSONS PROJECT'),$insert(%artist%,'THE ',0),),)$replace(%artist%,'CHRIS FARLOWE & THE HILL','CHRIS FARLOWE WITH THE HILL')$replace(%artist%,'YUSUF','CAT STEVENS')
means:
my tag result in remap-field (should be like in last.fm)
ALLMAN BROTHERS BAND THE ALLMAN BROTHERS BAND
ALAN PARSONS PROJECT THE ALAN PARSONS PROJECT
CHRIS FARLOWE & THE HILL CHRIS FARLOWE WITH THE HILL
YUSUF CAT STEVENS
2) refresh function (maybe under "delete empty folders")
thx
for example:
$if($or($strcmp(%artist%,'ALLMAN BROTHERS BAND'),$strcmp(%artist%,'ALAN PARSONS PROJECT'),$insert(%artist%,'THE ',0),),)$replace(%artist%,'CHRIS FARLOWE & THE HILL','CHRIS FARLOWE WITH THE HILL')$replace(%artist%,'YUSUF','CAT STEVENS')
means:
my tag result in remap-field (should be like in last.fm)
ALLMAN BROTHERS BAND THE ALLMAN BROTHERS BAND
.........................
thanks I understood
hi
maybe remap %album% (i don't use it) could be useful for other people
thx
maybe in properties a new line named "remap artist". (very large)
if it will be so
script - no download possible
script - no download possible
lender1257 ,
whitch script - no download possible
I'm sorry, I thought you already finished it.
input line is ok.
thx
"Biography, Albums, Similar and title artist info. www.last.fm"
version "030322018"
Added:
review of playing or selected album;
menu item "Refresh" (default is false, see menu Properties);
remap artist (menu Properties);
"img border thickness" (menu Properties).
language - left mouse (or left mouse + Shift) double click on the text (main menu to set);
font size - Shif + mouse wheel on the text or text header (menu properties to set);
move text - press left mouse button on the text and move;
hide text - mouse mbtn dblclk on the text header;
previous, next img. - mouse wheel on the img;
select artist, albums (most popular or release date), similar artist, album or title info - left mouse double click on the img (main menu);
img. interval setting - Shift + mouse wheel on the img;
for advanced settings see menu properties;
background transparency under the text - Ctrl + mouse wheel on the text.
Added:
review of playing or selected album;
My mistake
Added:
review of playing or selected title;
hello kgena_ua
thank you very much
all works perfect
you're great
thx a lot
lender1257,
glad to be useful
"Biography, Albums, Similar and title artist info. www.last.fm"
version "030322018"
for jscript panel v2.0.6
hello kgena_ua
thank you very much
all works perfect
you're great
thx a lot
I work fine with foo_uie_wsh_panel_mod 1.56
good!
hi kgena_ua
bio: searching for THE V.I.P.'s (availabe in english last.fm) but script founds: THE VIP's (= false artist)
can you please make a correction.
thx
bio: searching for THE V.I.P.'s (availabe in english last.fm) but script founds: THE VIP's (= false artist)
Hi.
Is it? If no give me a LastFM link
hi
yes, script finds this wrong artist
link for correct artist: https://www.last.fm/music/The+V.I.P.%27s
thx
"Biography, Albums, Similar and title artist info. www.last.fm"
version "240322018"
hi kgena_ua
works perfect
thx
"Biography, Albums, Similar and title artist info. www.last.fm"
version "15062018"
While only for WSH panel
The script is not compatible with the previous version, saved data must be deleted.
"Biography, Albums, Similar and title artist info. www.last.fm"
version "15062018"
for jscript panel
Hi kgena_ua!
I gladly tested your component (for jscript panel), there are positive improvements.
It is making a good alternative.
Keep it up!
Regards.
Sergey77, thanks, I like it myself
Sergey77, thanks, I like it myself
thanks for good work.
would you bring these options back ?
https://imgur.com/a/ohXvY3q
(https://i.imgur.com/Bf0MqMs.png)
would you bring these options back ?
?
displayed menu items from another of my scripts - "Get Covers (Artwork) radio logos".
"Biography, Albums, Similar and title artist info. www.last.fm"
version "15062018"
for jscript panel
hi
script crashes when using jscript 1.3.2.2
getcolour should be getcolor (9 times)
Thank you for all of your hard work, kgena_ua. This component is one of my favorites! Also, I'm not sure where to post bug reports but I hope its alright to post the fix here. If there is no active internet connection and the biography is not cached, then a crash occurs. Here is a screenshot of the error:
The fix was to replace this line (around line 549, use control+f to search):
if (this.xmlhttp != null && this.func != null) {if (this.xmlhttp.readyState == 4) {if (this.xmlhttp.status == 200) this.func(); else {this.on_search_done_callback(artist, list, done, handles);}}}
with this line:
this.on_state_change = function() {
if (this.xmlhttp != null && this.func != null) {
if (this.xmlhttp.readyState == 4) {
if (this.xmlhttp.status == 200) {
this.func();
} else {
if (this.on_search_done_callback != null) {
this.on_search_done_callback(artist, list, done, handles);
}
}
}
}
}
Now, the null check prevents the script from crashing and instead displays placeholder text. Attached are images of each event. Also, GetColour() works on the current version of JScript Panel. That error only affects older versions.
It seems that this report concerns JScript Biography 0.9.0.2 (https://hydrogenaud.io/index.php/topic,112913.msg952419.html#msg952419), and would have been best put in the discussion thread (https://hydrogenaud.io/index.php/topic,112914.0.html) dedicated to that. Not to worry, I'll try and fix it for the next version. However, it's not actually currently obvious to me why your fix worked, since the callback is defined (line 542) as it's sent to the master function (line 541). I couldn't seem to reproduce the issue. Anyway I'll think about it further. Line 549 in the release version is also just a "}" and not an object and so I would like to be sure that the issue occurs with the script in a completely unmodified state. Please post any further discussion here (https://hydrogenaud.io/index.php/topic,112914.0.html).
Thanks for the report.
"Biography, Albums, Similar and title artist info. www.last.fm"
"22082018"
Well, this is embarrassing. I'm sorry for the inconvenience.
"Biography, Albums, Similar and title artist info. www.last.fm"
"22082018"
@kgena_ua what's new in this version?
please always post your changes
thanks
what's new in this version?
please always post your changes
thanks
- optimization;
- added lyrics for the selected track;
- changes in the main menu (see "Menu setting");
- added external links for artists and related artists.
what's new in this version?
please always post your changes
thanks
- optimization;
- added lyrics for the selected track;
- changes in the main menu (see "Menu setting");
- added external links for artists and related artists.
@kgena_ua additional question:
is this script for wsh_panel_mod or
for jscript 1.3.2.2 or
for jscript 2.1.6
please also provide this information in the future if you change your script
thank you
"Biography, Albums, Similar and title artist info. www.last.fm"
version "14092018"
Minor corrections and optimization .
Added:
- when viewing information about the artist, the meaning of the lines "popular this week" and "the latest releases" are clickable (double click).
The saved data (if saved) must be deleted, or use the menu item Refresh.
The Properties menu must be updated.
The script is compatible with:
- wsh_panel_mod ;
- jscript_panel (all version).
"Biography, Albums, Similar and title artist info. www.last.fm"
version "30122018"
Added:
- smooth scroll.
The Properties menu must be updated.
The script is compatible with:
- wsh_panel_mod ;
- jscript_panel (all version).
Hello,
kgena_ua,
I have used the newest script. Could you please make some changes for more better?
1)one special character,like dot ".". It can not be changed to dot"."(keep the same).
2)It can not set the path of the album's images in one seperate directory.(named as %album artist% - %album%)
3) I don't need some information for XXX_the _artist_info.ini.(except:external_links,born)
I wish you make this to be the one best excellent script tool.
Thank you very much.
:) ;D :)) :D
And 4) if the search information is empty,don't create this artist's folder.(add a property like as setting: "remap artist").Thanks. ;D
Hello, I found that "remap artist" and "Unkown Artist"(no information) can be one function.(Add a fuction button "remap"- "remap to Unkown Artist and delete the folder"(like black list)). By the way,some artists have no other language's translation.(like as no information)(It will be much better to fetch the correct language information automatily.)
hikaze,
I will think
Hi there!
@kgena_ua,
Please add the lock mode with the "lock" button on the script field window. Because sometimes a song ends (image and text change) before you have time to read the text and view the images (for example when listening to internet radio).
It would also be nice to add a mode of fixed separation of text and image excluding overlay.
Thanks for this great script!
Hi there!
@kgena_ua,
Please add the lock mode with the "lock" button on the script field window. Because sometimes a song ends (image and text change) before you have time to read the text and view the images (for example when listening to internet radio).
Very interesting.
As you see it. Menu item, hotkey or something else. How to call this feature. How should this work.
Conveniently if it would be the "Lock" button as shown at the picture (highlighted in red).
If the user clicks on the "Lock" button, mode is on - when the music track and the artist change, but the picture and text do not change, they remain for the previous track and artist.
If the user clicks on the "Lock" button again, mode is off and the script continues to work as usual.
Thank you!
Hello,This script took a long time to load.(more than 8s, sometimes > 30s).(Some reason is that I used 2 script in Panel.)
I think this script need to speed up the load speed.It used too many function clean(). Sorry,I don't much more ability to improve with it. I'm a new learner.
208 line:(The special characters do not need to be customized.I think that another plugins also handled it simply.)
var tmp = n.replace(/[\/\:\*\?\"<>\|\\]/g,"_");
"Biography, albums, title, similar artist info.www.last.fm."
@version "27062019"
jscript panel, wsh panel mod.
Add:
- new customizable main menu - see menu item "Main menu setting";
- lock mode - left mouse button dblclk on header_1 (artist);
- collapse / expand additional info text - popup button between header_2 and main text;
- menu item "Hisory" - view previously downloaded data if it is stored in the tmp_Biography folder (by default).
Saved data reload.
Before installation, clear variables - the "Properties" menu.
Hi! Last.fm again changed the design ... Every time it gets worse! And the photos stopped loading ...
Hi! Last.fm again changed the design ... Every time it gets worse! And the photos stopped loading ...
udege,new test version you can find here
http://foobar2000.ru/forum/viewtopic.php?t=1878&p=73458#p73458 (http://foobar2000.ru/forum/viewtopic.php?t=1878&p=73458#p73458)
No update? Still "No Photo" in Biografi.
No update? Still "No Photo" in Biografi.
emaulana,
see previous post
hi kgne_ua
I'm using your script from 20180324 (JScript1.3.2.2) - any chance to update this too?
does your newest script have the option to disable some information?
i only want to see the artist-name and the biography; all other information in between is useless information for me
thanks
No update? Still "No Photo" in Biografi.
emaulana,
see previous post
Ok, it is working now. Thank u for your script bro. My Foobar2000 is look beautiful again.
@kgena_ua
sorry, I didn't read your mail well enough. the function is already inside.
thank you
"Biography, albums, title, similar artist info.www.last.fm."
@version "13072019"
Minor fixes.
"External links" work.
Added the ability to view text using the keys UP, DOWN, PAGE_UP, PAGE_DOWN, HOME, END.
LEFT and RIGHT keys to change the image.
Accordingly, the panel should be active (selected, left-click on the panel, for example).
hi kgena_ua
works perfect - great work !!
Great script. Thanks for making this.
"Biography, albums, title, similar artist info.www.last.fm."
version "24082019"
Changes in the history menu section:
- history list navigation - Mouse, Up, Down, Page Up, Page Down, End, Home keys;
- artist selection - left mouse button, Enter key;
- deleting a list item - menu, Delete key;
- delete history list - menu.
Minor changes and improvements.
Properties needs to be updated.
need your recommendations for improvements
Looks like the pulling of artist art is broken? It won't load artist art anymore for me.
I confirm.
images are no longer loaded.
Last.fm has changed its site.
version 24.08.2019
@kgena_ua new version 2019-10-26 works - thank you
http://foobar2000.ru/forum/viewtopic.php?t=1878&start=2660 (http://foobar2000.ru/forum/viewtopic.php?t=1878&start=2660)
"Biography, albums, title, similar artist info.www.last.fm."
version "07112019"
compatible with WSH panel mod and jscript panel
lender1257,
what is your opinion about the versions 26102019 and 07112019
hi kgena_ua
i don't see any difference between the two versions.
version 2019-11-07 works fine.
i leave this version installed.
@kgena_ua hello
i use version 2019-11-07
please do not write the band members in a row but each one in a line
thanks
hi kgena_ua
i don't see any difference between the two versions.
version 2019-11-07 works fine.
i leave this version installed.
changes on the last.fm website
Hello i have problem like this when i put Biography .
What should i do?
hi,
i'm not sure, but i thinks it works only with jscript panel or wsh panel mod.
Hello i have problem like this when i put Biography .
The script is compatible with jscript panel and wsh panel mod
When i put on jscript or wsh panel i have this same error
JScript Panel v2.3.5 (id:1902770)
Błąd kompilacji kodu JavaScript:
Błąd składni
File: <main>
Line: 3, Col: 1
const requiredVersionStr = '1.2.2'; function is_compatible(requiredVersionStr) {const requiredVersion = requiredVersionStr.split('.'), currentVersion = utils.Version.split('.'); if (currentVersion.length > 3) currentVersion.length = 3; for (let i = 0; i < currentVersion.length; ++i) if (currentVersion != requiredVersion) return currentVersion > requiredVersion; return true;} if (!is_compatible(requiredVersionStr)) fb.ShowPopupMessage(`Biography requires v${requiredVersionStr}. Current component version is v${utils.Version}.`);
works perfect with foo_jscript_panel-v1.3.2.2
later versions of jscript_panel have changed significantly
please search the web for version 1.3.2.2
thx
Hello to everyone !
I have wsh panel v1.5.6 and i try to manage it for Biography text, Album info... but always an eror message came up,
I runed also from kgena_ua ''Reply #99 – 2019-11-07 13:00:16'' and i have the same message, you can look at the file.
If someone have an idea how it can work please let me know.
Thank you!
@kgena_ua please include a remap function for album titles as well (analog remap artist)
thanks
@kgena_ua
please include a remap function for album titles as well (analog remap artist)
Add menu item "remap". Now I'm testing.
"Biography, albums, title, similar artist info.www.last.fm."
@version "26052020"
Added: remap function for album titles.
Minor fixes.
great work !
remap-album function perfect.
small mistake in the context menu "remap artist" the "t" is missing
leave the previous artist-remaps as they are, or rather use the new remap-function-artist to create new ones ?
will the old remap-artist function be abandoned at some point?
can you transfer the existing remap-artists into the new editor automatically?
greetings
Thanks.
can you transfer the existing remap-artists into the new editor automatically?
the old existing remap-artists data will be lost.Do not refresh "Properties"
I'll try
Do not refresh "Properties"
1. Open script "Biography..." by pressing "Comfigure..."
2. Paste at the end of the script:
// transfer_data script
var remap_data = window.GetProperty(" remap artist", "ALLMAN BROTHERS BAND:THE ALLMAN BROTHERS BAND;");
transfer_data(remap_file_path("artist"));
function transfer_data(path) {
var tmp_arr = [];
tmp_arr = remap_data.split(/[:;]/g);
try {
remap_file = fso.OpenTextFile(path, 8);
if (tmp_arr.length){
remap_file.WriteLine(tmp_arr.join("\r\n"));
}
remap_file.Close();
} catch(e) {};
}
3. Press "Apply"
4. Check file ... /tmp_Biography/_download/remap_artist.txt
5. If the transfer completed successfully, delete "transfer_data script"
5. Press "Apply".
has worked perfectly
thank you very much
@kgena_ua error at remap-album (maybe at remap-artist too)
example:
"Dark Side Of The Moon (Experince Edition)" is remaped to "Dark Side Of The Moon"
remap is ok; the correct entry is displayed.
original album "Dark Side Of The Moon" is not remaped. in remap_album.txt however "Dark Side Of The Moon" (as remaped entry) is found and now the following entry is taken as "remap". but this is the next album to be remaped. in my case "Live At Montreux 1991 (Collectors' Edition)
only the 1st entry may be searched for when comparing (never the 2nd entry)
extract from my remap_album.txt (sorry, can't upload a picture)
Dark Side Of The Moon (Experince Edition)
Dark Side Of The Moon
Live At Montreux 1991 (Collectors' Edition)
Live At Montreux 1991
please correct - thanks
suggestion:
make it single-lined again, with ":" as the separator (as the old way of remap-artist but with txt-file)
i think this will do best
thanks
remap album name
better you take "::" (2 x colon) as separator
I saw that there are many albums that have ":" in them.
For example: Stay With Me: Faces Anthology
please transfer the previous data automatically into the new format
thanks
better you take "::" (2 x colon) as separator
I saw that there are many albums that have ":" in them.
For example: Stay With Me: Faces Anthology
You're right
make it single-lined again, with ":" as the separator (as the old way of remap-artist but with txt-file)
i think this will do best
"Biography, albums, title, similar artist info.www.last.fm."
version "10062020""*" as the separator
the previous remaps (artist + album) were set to "*" (everything ok), but the remap name is not searched for. the search is for the original artist/album name. only if you do a manual remap, it works correctly.
please correct this - thanks
Hello,
thank you very much for this script. Would it be possible to disable some features? I'm interested in the (automatic) artist image download only. Or is there a separate script for this case?
Thank you in advance.
hello kgena_ua
it is possible that you include the artist-name in the album-remap so that if you have several identical album-names, the correct album will be displayed.
if the artist has already been remapped, the remapped artist-name should be used.
if possible, please sort history, artist and album.txt.
thanks
hello kgena_ua
what do you think about adapting your script for spider monkey panel ?
Hi everyone,
Is there a way to disable the ability to drag&drop the text around? It would be cool if the user could select the text instead of moving it around.
1. The function of "Remap album name" will be fixed.
New metod to remap: Artist(Remaped Artist)*Album*Remaped Album.
2. I want add to this script my script "Get Covers (Artwork)..." to view external and embedded covers.
Is there a way to disable the ability to drag&drop the text around? It would be cool if the user could select the text instead of moving it around.
Sorry. I can not understand.
Thank you for a great mod.
It works perfectly with local playlist, but when i open online radio (somafm.com/listen for example) it shows red screen with "JavaScript error" and following error message:
"JScript Panel v2.5.3 (Biography, albums, title, similar artist info.www.last.fm. v10062020 by kgena_ua)
JavaScript runtime error:
Object not a collection
File: <main>
Line: 975, Col: 5"
Is it solvable?
On line 971, replace the existing Eval function with this...
function Eval(field) {
if (!metadb) return "";
complete_path = metadb.Path;
directory_path = fb.Titleformat("$directory_path(%path%)").EvalWithMetadb(metadb);
var tfo = fb.TitleFormat("[" + field + "]");
if (fb.IsPlaying && complete_path.indexOf('://') > 0) {
return tfo.Eval();
} else {
return tfo.EvalWithMetadb(metadb);
}
}
snotlicker
Solved, thank you!
Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm.
version "06042021
tested on Wsh Panel Mod v1.5.10.
Add: covers review. See menu item "Image source".
Choice:
- external covers;
- embedded covers, or external and embedded covers;
- priority external covers;
- priority embedded covers;
- cover information
Add: set the default cover image. See menu item ""Image" - "Default image ".
Fixed: New "Album remap" metod.
Many changes
The Properties menu must be updated.
Check your "_download" folder. Some files will be renamed.
hi kgena_ua
I have tested your new script a little with jscript-panel v.1.3.2.2
so far i only noticed this (see picture)
another little thing found:
the first header of "similar artists" is missing
this is how it looked in the last version:
another little thing found:
the first header of "similar artists" is missing
this is how it looked in the last version:
Hi,
lender1257.
Yes, i changed it. Now first header - similar artist. Second header - years activity.
hello kgena_ua
i have tested a little again with jscript-panel v. 1.3.2.2
thank you:
- for sorting remap files.
- the change to remap-album also works very well
(duplicate album names can now be distinguished)
this does not fit yet (see picture)
artist=chicago; this will be shown when switched to "similar artists"
please put back "similar artists" as in the previous version.
otherwise you don't know that you have changed to "similar artist".
you haven't changed the other settings (album, most popular albums, ...) either (they are the same as before).
I also think it's clearer.
thank you
i have tested a little again with jscript-panel v. 1.3.2.2
lender1257[/b],
I cannot understand why this does not work with jscript-panel.
I tested it with:
https://jsfiddle.net/a8c1z4x6/ (https://jsfiddle.net/a8c1z4x6/)
everything is ok. The code is written correctly.
I use Wsh Panel Mod v1.5.10.
type=thumb]post_tmp_125956_341f5ff53d74bd49bd768392f4d1b685[/attach]
put back "similar artists" as in the previous version.
in any case, there will be an update since I found several bugs[attach
hello kgena_ua
a few notes what i have done.
properties completely new.
listeners, scrobbles, ... switched off
birthday, active ... switched on
when loading the data from the database, birthday or active comes up with <P>.
you can recreate this at any time with "refresh". (pic1)
when foobar is restarted + the same artist, the data is read from the hard disk.
now the birthday, active line is missing (pic2)
(no problem for me)
I hope this helps a little bit
please put back "similar artists" as in the previous version.
Done.
Similar artists are added to history. Done.
Fix errors (remap function), Done.
Wot else ?
the test will show ...
please release the new script
addendum: please sort the history_list file
thank you
Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm.
version 10042021
tested with Wsh Panel Mod v1.5.10.
@kgena_ua
thanks for the changes.
have now installed both panels
foo_jscript_panel-v1.3.2.2 (from 2017)
foo_uie_wsh_panel_mod-1.6.3 (from 2015)
jscript-panel shows in addition to "active + founded" also the members of the band - maybe that's where the error comes from (<P>)
wsh-panel shows only "active + founded - no band members
Check with foo_spider_monkey_panel.
Works fine.
An hour with a timer needs someone
spider-monkey panel: will try it out soon
question: Similar artists are added to history - why?
question: Similar artists are added to history - why?
"History" is my favorite function. I use it a lot.
For spider-monkey panel need to redo a lot. If there is a need, I can try.
For spider-monkey panel need to redo a lot. If there is a need, I can try.
i think it would be good to have a 2nd panel available. it will be a lot of work. and you always have to change everything 2 times.
maybe it would be better to create your own bio-plugin. :D
have a nice sunday
Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm.
version 14042021
tested with Spider Monkey Panel v 1.4.1
This is my first experience with SMP.
very good work - congratulations !
I noticed:
history file: called "similar artists" 2 times
the entries are duplicated and each entry is 2 lines long
Birthdates and years active are not shown.
Addendum:
after looking at the artist's "most popular albums" and going back to artist, the birthday announcement is also there !!
Hi, lender1257. Thanks.
"History code" has been changed. The old file "history_list.txt" may not be merged with the new version. Delete it.
Function "Years active" while temporarily disabled. Saving is disabled. If you use the old saved data, then it is read.
The main thing is that the script works with Spider Monkey Panel. Working on this panel is a pleasure.
Now I plan to use the JSON format to save the data. I study.
I am interested in how the function of displaying covers works - "Image source : Covers".
Function "Years active" while temporarily disabled. Saving is disabled. If you use the old saved data, then it is read.
I am interested in how the function of displaying covers works - "Image source : Covers".
do you mean it is currently deactivated in your SMP-script and will be reactivated with the next update? or am i doing something wrong?
i'm sorry, i don't use the cover-feature.
Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm.
version 01052021
tested with Spider Monkey Panel v 1.4.1
Fixes.
Added menu item "Cusnom colors".
hello kgena_ua
i have switched to spider monkey panel.
could not find any errors so far.
it all works very well.
congratulations - good job !!
now something has turned up after all:
although i have already clicked on "don't ask me again",
this message almost always comes up when fb starts up.
now something has turned up after all:
although i have already clicked on "don't ask me again",
this message almost always comes up when fb starts up.
lender1257,
At what point did it happen ?
hello kgena_ua
this happens to me on both pcs when i start foobar for the first time.
if i then quit foobar and start it again, the message does not appear.
no other program is open.
I have attached the two console logs. maybe it will help you.
lender1257, greetings.
Your initialization time is too long.
I have
https://hydrogenaud.io/index.php?topic=115709.new "Get Covers (Artwork) radio logos"
how to use it with Spider Monkey Panel?
now something has turned up after all:
lender1257,
does this happen if only the "artist" menu item is selected?
hi
i have switched off everything, but the message still comes up.
the problem: loading takes too long for SMP.
foobar has to read more than 20,000 tracks, covers, including some filters and statistics. the startup also took a little while under WSH. but it wasn't really a problem.
I have no idea how to test your script, because first the message appears and only after answering it, foobar is loaded.
PS: pm me if you want
i'll be back later afternoon
hello kgena_ua
i think your script is ok. i have tested with both of my pcs.
the message actually only appears the first time foobar is started after windows has been restarted. most of the time; but i've also managed not to get the message!
and that's probably because both pcs are a bit slow. maybe there's also a timer in the SMP (not your script) that has expired and that's why this message appears.
Anyway, I can live with it.
hello kgena_ua
can you please change your script to create console entries. or can i do that with the SMP anyway. i haven't found anything.
I would like to know what is displayed in the script when the message comes up.
as "regor" meant. https://hydrogenaud.io/index.php?topic=116669.msg997030#msg997030 (https://hydrogenaud.io/index.php?topic=116669.msg997030#msg997030)
thank you
hello kgena_ua
can you please change your script to create console entries. or can i do that with the SMP anyway. i haven't found anything.
I would like to know what is displayed in the script when the message comes up.
as "regor" meant. https://hydrogenaud.io/index.php?topic=116669.msg997030#msg997030 (https://hydrogenaud.io/index.php?topic=116669.msg997030#msg997030)
thank you
You don't have to do anything in that case, just press stop. It will crash and show you the lines
hello regor
I don't know any stop button.
I tried the following whenever the message came up:
stop script, pause key, ctrl pause key
no crash !?
I have catch it.
I don't know any stop button.
lender1257
I have catch it.
I don't know any stop button.
lender1257
Exactly. Pressing stop will break execution, crash the panel and then a popup will appear with the problematic lines.
Then post that error for
@kgena_ua
thanks guys
I have done this a few times, but no crash.
today i do it again and, a crash ...
Replace panel with attached file. Should show on console the file(s) which produce the slow down and maybe you can find some errors on those (?).
Supposing that's the problem, I find too strange that sometimes it takes 3 secs for you and other times 30 secs (how much time was taking before?). That could point to an HDD error on your side, while retrying reading the block.
hello regor
before i switched to SMP, fb took about 10 seconds to start. (estimated).
i don't think it's the hard drive. the message comes on 2 different machines.
i've tested HDD with CrystalDisk-Info - HDD is good
sometimes there is no message at all (as before).
attached is the console of bio_test.js
as soon as windows 10 21H1 comes, i will do an "inplace upgrade". maybe that will help.
thank you
The script is taking too much time, but not specially at that point (although 300 ms to just read a text file seems excessive). You stopped the script at that point before, but there must be other places which take more time. 14 secs is too much, so kgena_ua will have to add profilers at multiple points to see where the problem is. SMP is supposed to be faster, so it may be that some code is not optimal and you have a large database which exacerbates the problem.
@kgena_ua Btw the fso calls can be replaced with this on SMP
utils.IsFile(file);
utils.IsDirectory(folder);
And providing codepage on ReadTextFile would be faster.
@kgena_ua Btw the fso calls can be replaced with this on SMP
utils.IsFile(file);
utils.IsDirectory(folder);
And providing codepage on ReadTextFile would be faster.
regor, thanks.
kgena_ua will have to add profilers at multiple points to see where the problem is
what is it.
I'm sorry I'm not English speaking. sometimes there are problems in understanding.
@kgena_ua Btw the fso calls can be replaced with this on SMP
utils.IsFile(file);
utils.IsDirectory(folder);
And providing codepage on ReadTextFile would be faster.
regor, thanks.
kgena_ua will have to add profilers at multiple points to see where the problem is
what is it.
I'm sorry I'm not English speaking. sometimes there are problems in understanding.
Dont worry, ask me anything you don't understand.
var profiler = new FbProfiler('MY CODE 1');
.... code 1 that might be slow
profiler.Print();
...
var profiler = new FbProfiler('MY CODE 2');
.... code 2 that might be slow
profiler.Print();
-> on console
[17:31:01] Spider Monkey Panel v1.4.1-dev+0f2108d4: profiler (MY CODE 1): 10ms
[17:31:01] Spider Monkey Panel v1.4.1-dev+0f2108d4: profiler (MY CODE 2): 1500ms
// Code 2 may have problems?
That will show you why your code is slow t in SMP.
More notes:
- create_history_array -> add profiler?
- load_json_data -> add profiler?, add codepage to utils.readText (faster)
- save_json_data -> replace fso with utils.writeText and force codepage utf-8 (faster)
before i switched to SMP, fb took about 10 seconds to start. (estimated).
i don't think it's the hard drive. the message comes on 2 different machines.
First of all, the "slow script" message doesn't persist between foobar starts (with good reason). Saying don't show this again only lasts until you restart.
Second when you start up foobar and it takes a long time to load, what happens if you immediately close foobar and then start again? Does it still take 10+ seconds, or is it much faster? When my HDD is not spinning or if I'm doing something else on another drive foobar can take a long time to start for me too. That's why if you're trying to check startup time you should always start foobar, then shut down and immediately restarting before checking the start up times It will remove at least one variable.
@kgena_ua :
Regor is correct the Utils.IsFile and Utils.WriteText will probably be "faster" but honestly we're talking speeds that are unlikely to matter. If fso.WriteFile ever takes more than 10ms something's most likely going on that doesn't have anything to do with the script. I tested it and I get 0ms pretty much every single time. Loads are essentially the same. This kind of optimization only really matters when you're trying to process hundreds of files in a loop, or writing massive amounts of data. In my opinion, fso is unlikely to be the culprit, although it can easily be replaced.
BTW, if you're concerned about the encoding, when you do utils.WriteTextFile the encoding is always UTF-8, so you'd want to pass 65001 as the codepage for utils.ReadTextFile.
hello MordredKLB
for clarification:
both computers are affected.
windows startup is completely done. HDD is running. no other programs are started.
starting fb for the first time --> 10+ seconds + script message.
if i stop fb and start it again immediately, it takes about 3 seconds and the message doesn't come up.
obviously there is still enough information in the memory.
hard disk is running!
another problerm (for example):
when the script from kgena_ua accesses the lastfm-db, the music continues to play, but fb freezes completely until the data from lastfm is displayed. (7-8 seconds)
@kgena_ua:
i do believe (although my music db is not small) that it's the script.
please have a look at WilB's bio-script, maybe you'll find something there that you can take over into your script and thus achieve an improvement.
you do it !
greetings
windows startup is completely done. HDD is running. no other programs are started.
starting fb for the first time --> 10+ seconds + script message.
if i stop fb and start it again immediately, it takes about 3 seconds and the message doesn't come up.
obviously there is still enough information in the memory.
The entire reason this is happening then is because it's loading your media library (which you admit is not small). At first startup foobar needs to read the hashes of every single directory in your library to ensure that nothing changed, and compare it to it's database, and then update changed files as needed. At second start that database is already in memory, and maybe directory hashes have been cached somewhere in the drive's buffer to cut down on reads. I don't know why it'd be so much faster, but it is.
At second startup this doesn't take as long. Again, this isn't
really a problem with the script so much as an issue with FSM's execution being blocked. All the code optimizations in the world aren't going to solve this because the script isn't actually doing anything for large periods of time, and yet FSM's 10second slow script timer is still going.
I had the same exact issue when I ported Georgia over to FSM as well, but I don't think most people do otherwise we'd see this kind of complaint a lot more. Most likely it's a combination of media library size, HDD speed, and size of the scripts. @kgena_ua can attempt to work around the problem by executing parts of his script in async promises, which will periodically exit the script execution thread and reset the 10 second timer. That's what I did, and it solves the problem almost all the time except when I'm doing heavy writes/reads on another drive at the same time I startup foobar for the first time. The other solution is for him to remove a significant portion of the code (1-2k lines I'd guess), but that's probably not going to happen.
hello MordredKLB + kgena_ua
thank you MordredKLB for your comments.
I agree with you that the size of the music db, the speed of the hdd and the computer are partly responsible for the loading time.
some music lovers will have 20,000 tracks (138 GB) or more. the pcs are 6 years old.
I tested wilb-bio-script today (not a single script error) and compared the start time with that of kgena_ua-script.
it seems (as you also say) that there is still room for improvement.
kind regards
I have +70K tracks on my library and loading time is not a problem on my side at all with Wilb script, nor this one, neither with my own which do more expensive calcs at startup than reading text files. So I don't think a large library is the answer but how the thing is coded.
It makes no sense at all that it takes 14 secs at startup when the script is supposed to just show some info from a text file for the current track. No matter how you look at it.
I have +70K tracks on my library and loading time is not a problem on my side at all with Wilb script, nor this one, neither with my own which do more expensive calcs at startup than reading text files. So I don't think a large library is the answer but how the thing is coded.
It makes no sense at all that it takes 14 secs at startup when the script is supposed to just show some info from a text file for the current track. No matter how you look at it.
I have 70k files and like I said, and it is 100% the result of other processes that are happening at startup. Nothing in this script is taking 10+ seconds to load... it's just not executing. Also as soon as the slow script popup appears FSM purposely blocks script execution, but the timer keeps running so all you can say is it is taking more than 10 seconds.
An even better test than just restarting foobar is to clear the script completely. Load a different script. Close and restart foobar, then replace the other script with this one. My guess is it will take <100ms. There's no logical way you can say "well if you load it after foobar starts up it takes a 10th of a second, but if you load it while foobar is starting up for the first time in a while it takes 100x longer" and conclude that the script is doing something wrong.
The problem is NOT the script, it's what FSM is doing at startup, and that's having it's execution thread blocked for <REASONS>. The problem might be FSM, and it might just be how fb2k allows components like this to execute.
@TheQwertiest might have some ideas, but I wouldn't be surprised if it's outside his control. Like I've said, there are things you can do to slice up the script loading into async pieces, but again all that does is hopefully mitigate showing the "slow script" popup, it doesn't do anything to speed up loading. In fact it'll actually slow things down a little bit (Georgia went from 150ms to 350ms load time), but again that's better than showing a popup that users have to clear.
I'm out of this discussion. You are making assumptions about what may be the problem, the same than me, but there is a limit... it's pretty clear the problem only appears on this script for him -on operations by this script at 2 different points- (while the rest are doing fine), which contradicts your points and <reasons>. Neither it's a general problem by SMP since everybody's scripts don't get randomly blocked indefinitely at startup neither take +10 seconds to load due to <reasons>.
If that happens, unless SMP has a bug which magically only happens here, the most probable reason points to something coded on the script, since no operation requires waiting +10 seconds unless you are doing something really strange. Like processing the entire library, loading files for no reason on memory, opening text files which are blocked or using on_metadb_changed which also fires on startup multiple times for heavy tasks (which takes 70% loading time on my setup to do nothing)....
I'm out of this discussion. You are making assumptions about what may be the problem, the same than me, but there is a limit... it's pretty clear the problem only appears on this script for him -on operations by this script at 2 different points- (while the rest are doing fine), which contradicts your points and <reasons>. Neither it's a general problem by SMP since everybody's scripts don't get randomly blocked indefinitely at startup neither take +10 seconds to load due to <reasons>.
If that happens, unless SMP has a bug which magically only happens here, the most probable reason points to something coded on the script, since no operation requires waiting +10 seconds unless you are doing something really strange. Like processing the entire library, loading files for no reason on memory, opening text files which are blocked or using on_metadb_changed which also fires on startup multiple times for heavy tasks (which takes 70% loading time on my setup to do nothing)....
I'm sorry, but you can't reproduce this issue and I can. I have a fairly good idea of what's going on because I tested it once a day for 6 months. Take a look at my investigations into this issue from a year ago. (https://hydrogenaud.io/index.php?topic=116669.msg985770#msg985770) You claim that it's hanging at 2 different points, but you have 0 proof of that. I can almost guarantee you that if he broke execution 10 times it would happen in 10 different places. It's NOT the script (other than the general size of the script... it'll never happen in short scripts). It's that the thread executing the script has paused execution for <reasons>, but FSM's slow script timer is still counting up.
You state "Neither it's a general problem by SMP since everybody's scripts don't get randomly blocked indefinitely at startup neither take +10 seconds to load due to <reasons>" but then you turn around and say it's the script's fault even though nobody else is experiencing this. Obviously the problem is outside the script and is something with the machine, the HDD state, the size of the media library, other components being loaded at startup, the OS version, etc... you know <reasons>.
You don't have to believe me (and clearly you don't since you ignore all my proof even while arguing against your own statements), but there's probably nothing kgena_ua can do to fix this short of just masking the problem. I can try and help him do that if he likes, but honestly it's probably not necessary.
// Your biotest(1).js version (10+ seconds):
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 18497ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87 (Georgia: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 20537 ms
// Reloading same after foobar has started up:
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 400ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87 (Georgia: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 425 ms
:D
Thank you MordredKLB for your contribution.
I thought I was the only one getting this message.
But I couldn't find anything about it in the forum.
The test with bio_test(1) gives me almost the same result as yours.
I also just want fb to run (again) without stalling and without messages.
I am only a user and have been using fb since version 0.83 (2004 ?), with various plugins. And without any problems - great work by all involved.
I hope that this problem will also be solved.
With kind regards
Can't you just increase the default time limit here??
(https://i.imgur.com/C8ULpXx.png)
// Your biotest(1).js version (10+ seconds):
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 18497ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87 (Georgia: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 20537 ms
// Reloading same after foobar has started up:
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 400ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87 (Georgia: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 425 ms
:D
I was not going to answer anymore, but wow. I mean, I clearly pointed to the problem...
Really man.. so you see that callback takes 18 secs on first execution but your conclusion is that it's fine. That is NOT right. No matter if it happens once every 2 times or on every startup.
Let me repeat it again. That callback (its code) does NOTHING useful on startup (since the panel is not visible neither usable until everything is loaded). And even worse, it fires multiple times on every startup (repeating the same actions for nothing). You don't have to use that callback until foobar has finished startup completely. So it is wasting 18 secs (or 400ms on second execution) for nothing, since there is nothing to display. If that's good practice coding... then I don't know what's bad coding.
(hope we can agree the biography panel has NOTHING to show when the UI has not loaded entirely yet, etc. so it should not try to process anything on that callback until startup has finished completely)
I really don't care since it is not my script, and I don't care if it's 500 secs or 400 ms. It's a freakin +90% of execution time wasted for nothing, just because the callback is being used wrong. If you simply add a boolean check on that function to return and do nothing (until a track is selected or playback changes for the first time or any other user interaction which can be associated to startup ending), magic. The problem is gone (although the entire routine should be checked since the behavior is not right). No matter if it's the first or the second execution of foobar.
But hey, you can keep discussing about the timer indefinitely. As
@snotlicker shows, it can be changed to an arbitrary number to not show the message. But that doesn't change the script is working erratically, wasting time for nothing. Which is the base problem...
Hello regor
I agree with you there.
The script must not start until fb is fully loaded!
Basically, scripts and panels (in my opinion) should only run when they are active - inactive panels do nothing.
Increasing the counter as snotlicker showed (I had no idea that smp enters something here) only leads to the fact that no more message is displayed, but the loading time remains the same. It takes far too long. I didn't have that with jscript-panel with the same number of tracks !! that means there must have been a change in the coding, or SMP reacts differently to the coding than jscript-panel.
Maybe there is a happy ending after all
Hello regor
I agree with you there.
The script must not start until fb is fully loaded!
Basically, scripts and panels (in my opinion) should only run when they are active - inactive panels do nothing.
Increasing the counter as snotlicker showed (I had no idea that smp enters something here) only leads to the fact that no more message is displayed, but the loading time remains the same. It takes far too long. I didn't have that with jscript-panel with the same number of tracks !! that means there must have been a change in the coding, or SMP reacts differently to the coding than jscript-panel.
Maybe there is a happy ending after all
Check your pm. About scripts doing things at startup... well that is in fact a "limitation" (*) of SMP, yep. They are loaded at startup and it's left to the coder the way it's loaded. You can debounce, throttle, delay, wait for callbacks, async, etc. to call some routines. Panels can be running code or not independently of being active. i.e. I have some panels which add some functions called by foobar standard buttons, they would not work if inactive panels can not run code.
BUT it's obviously the coder's responsibility to not add useless code at the wrong places. A bio panel, which requires painting the info, should only be running when the panel is active, I think that's obvious... others may think different.
* Limitation because there is not a "on_startup_finish()" callback to use yet for these cases.
I was not going to answer anymore, but wow. I mean, I clearly pointed to the problem...
Really man.. so you see that callback takes 18 secs on first execution but your conclusion is that it's fine. That is NOT right. No matter if it happens once every 2 times or on every startup.
Hey, we're getting somewhere now. You're almost there.
I agree with you that the callback does nothing useful on startup, but it's impossible to know when startup should end. I also probably wouldn't have coded it using on_metadb_changed, and if I did I'd check to make sure not to do anything if one of the changed handles corresponded to the metadb that's being watched, before reloading everything. Another thing that should be done at startup is to do the initial on_item_focus_change() async:
setTimeout(() => {
on_item_focus_change();
}, 1);
That'll help slightly.
The issue as you point out is you don't know when the UI is ready, and FSM can't provide that information (https://hydrogenaud.io/index.php?topic=116669.msg986061#msg986061). So we're kind of in a conundrum aren't we?
In my setup where I can make foobar start SLOOOOW, let me show you the output of the default 120 line "click here to open editor" FSM script:
Spider Monkey Panel v1.4.2-dev+1c8cdb87 (): initialized in 886 ms
User Interface initialized in: 0:09.237594
Autoplaylists initialized in: 0:00.042363
"Has Disc subtitle" : 0:00.042348
Startup time : 0:12.509686
A script that loads in 3ms every time when reloaded after foobar has started up, takes 886ms at startup (obviously very slow) but wait... Foobar is
still taking
12.5 seconds to startup because the UI is taking 9 seconds to start and everything else is basically instant. There's nothing to optimize. Nothing being wasted. Sometimes foobar is going to load very slow and it has nothing to do with the script. Now your argument is that the script is slowing the UI startup down by 886ms of that startup, but it's my contention that UI start up is essentially being paused and the script itself is not
really executing at that point. The_Qwertiest
seems to agree with me here as well (https://hydrogenaud.io/index.php?topic=116669.msg986075#msg986075), but I don't want to put words into his mouth. Attaching and pausing in VS2019 shows most of the time is being spent in ntdll.dll. Not sure what better JS is gonna do about that.
THAT'S why I say optimization doesn't help. Sure there are things
@kgena_ua can and should change. Storing the value of remap_artist so as not to recall that function every time is a good one, but ultimately that's not the cause, it's just exposing the symptoms.
One last debug log with a slight modification of your script to better illustrate what I'm talking about (and again refactoring to not use on_metadb_changed would be much better, but that's not the point):
Startup time : 0:17.958061
>>> D:\Source\foobar2000_portable\tmp_Biography\_download\remap_artist.txt
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
>>> D:\Source\foobar2000_portable\tmp_Biography\_download\remap_album.txt
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (album): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (album): 332ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 333ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (album): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (artist): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (album): 0ms
Spider Monkey Panel v1.4.2-dev+1c8cdb87: profiler (on_metadb_changed): 0ms
Startup took 17 seconds, but has already finished. Then we get 4 on_metadb_changed events immediately after startup finishes. Both remap_artist.txt and remap_album.txt are 0-byte files so there's nothing to read in them. That's why every instance takes 0ms except for that one remap_album call which "inexplicably" takes 332 ms. There is no performance optimization to be done inside remap_artist(). It already takes 0ms all the time, so something EXTERNAL to the script must be causing that blip. Foobar would also be unresponsive during that 1/3sec as well.
That's exactly what I'm seeing at startup as well.
Increasing the counter as snotlicker showed (I had no idea that smp enters something here) only leads to the fact that no more message is displayed, but the loading time remains the same. It takes far too long. I didn't have that with jscript-panel with the same number of tracks !! that means there must have been a change in the coding, or SMP reacts differently to the coding than jscript-panel.
You'd think I'd know the answer to this cause I very briefly "maintained" jscript_panel, but I don't.
@snotlicker do you know if jscript_panel executes scripts on the main UI thread or no? FSM does, and if that was a change from jscript it might account for the issues that lender and I are encountering.
In my machine (AMD APU A-10 with 57896 music files in a HDD the start up times are:
Spider Monkey Panel v1.4.1 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11642 ms
Spider Monkey Panel v1.4.1 (Biography: Biography v1.1.3 by WilB): initialized in 152 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 147 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 69 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 38 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 43 ms
User Interface initialized in: 0:12.522745
Biography is not that bad, the slowest is Library Tree
not so different after all....
Removing library tree Biography takes the crown
Album List refreshed in: 0:15.254283
Spider Monkey Panel v1.4.1 (Biography: Biography v1.1.3 by WilB): initialized in 11029 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 103 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 41 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 39 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 34 ms
User Interface initialized in: 0:26.975856
Biography is not that bad, the slowest is Library Tree
That's WilB's biography panel, not kgena_ua's. Library Tree is always slow, even outside startup for first load if you have a library of any significant size. It does a LOT of stuff, much of which can't be easily deferred.
Although your two posts demonstrate what I've been saying all along: In certain situations at startup the main foobar UI thread can be starved.
Biography is not that bad, the slowest is Library Tree
That's WilB's biography panel, not kgena_ua's. Library Tree is always slow, even outside startup for first load if you have a library of any significant size. It does a LOT of stuff, much of which can't be easily deferred.
Although your two posts demonstrate what I've been saying all along: In certain situations at startup the main foobar UI thread can be starved.
I can not test the other bio, not works at all for me in linux ;).
I understand the library tree time, is logic that takes its time to start up: in fact is faster than album list.
But if the work of library tree and album list are equivalents and his start up are similar, why in the first case Biography only takes 152ms and in the second time takes 11029 ms?
Biography is not that bad, the slowest is Library Tree
That's WilB's biography panel, not kgena_ua's. Library Tree is always slow, even outside startup for first load if you have a library of any significant size. It does a LOT of stuff, much of which can't be easily deferred.
Although your two posts demonstrate what I've been saying all along: In certain situations at startup the main foobar UI thread can be starved.
I can not test the other bio, not works at all for me in linux ;).
I understand the library tree time, is logic that takes its time to start up: in fact is faster than album list.
But if the work of library tree and album list are equivalents and his start up are similar, why in the first case Biography only takes 152ms and in the second time takes 11029 ms?
Just curiosity
But if the work of library tree and album list are equivalents and his start up are similar, why in the first case Biography only takes 152ms and in the second time takes 11029 ms?
FSM code runs in the main fb2k UI thread. For <reasons> the UI thread is getting starved (https://www.geeksforgeeks.org/deadlock-starvation-and-livelock/) and so execution happens VERY slowly.
I don't know what these <reasons> are, but they definitely seem to be caused by HDD activity in my case. Most likely the OS is preventing fb2k from reading the disk and so the thread is being blocked, but that's just a guess and could be different in different OS's and environments.
But if the work of library tree and album list are equivalents and his start up are similar, why in the first case Biography only takes 152ms and in the second time takes 11029 ms?
FSM code runs in the main fb2k UI thread. For <reasons> the UI thread is getting starved (https://www.geeksforgeeks.org/deadlock-starvation-and-livelock/) and so execution happens VERY slowly.
I don't know what these <reasons> are, but they definitely seem to be caused by HDD activity in my case. Most likely the OS is preventing fb2k from reading the disk and so the thread is being blocked, but that's just a guess and could be different in different OS's and environments.
With wine in linux the UI is only drawn before the HDD activity ends in start up.
So if the panel try to start up his full execution is delayed until the ui fully load.
So the mayority of this start up time is waiting for ui start.
I understand it right?
Please be patience, I'm curious but not a programer :P
I owe an apology to kgena_ua.
His version of Bio for spider Monkey Panel WORKS in wine.
I'm sorry I didn't saw it and only was tried the old version.
So if the panel try to start up his full execution is delayed until the ui fully load.
So the mayority of this start up time is waiting for ui start.
No and yes :D
For the UI to start a bunch of things have to finish first. One of those things is that FSM must finish its initial load: loading its own DLLs and code, then processing the script file and running any code it is told to run. However other things can cause that to take a long time.
Here's a dumb non-programming explanation that might make this whole discussion a little clearer:
Let's say you want to play a game of cards, but to start all the cards need to be in the correct Ace-to-King order by suit. Let's say at 12:00pm you drop all the cards on the table in a random pile and start sorting them. Your method is just to hunt for the very first card you want out of all 52 and then go on from there. In perfect conditions this process should take about 5 minutes. However while you're sorting your kid interrupts you asking you to fix him lunch, or pour him some water, or take him to the bathroom. Maybe the dog needs to be let out too. You also get a couple phone calls. Everyone of those things divides your attention or takes you away from the table where you can sort the cards. You finally finish at 12:30pm and can start your game.
Looking just at the clock it took you 30 minutes to sort your cards (initially execute the script) but during that time you were really only sorting cards for 5 or 6 minutes, and the rest of the time you were blocked from doing the task (waiting on the HDD or other things).
Now, you can come up with a better algorithm for sorting cards using multiple piles for each suit that maybe only takes 2 minutes, but if you keep getting interrupted it still might take you 25 minutes before you can start your game. Certainly better, but still the algorithm you use to sort the cards isn't the primary problem. This is the fundamental disagreement that
@regor and I are having :)
So if the panel try to start up his full execution is delayed until the ui fully load.
So the mayority of this start up time is waiting for ui start.
No and yes :D
For the UI to start a bunch of things have to finish first. One of those things is that FSM must finish its initial load: loading its own DLLs and code, then processing the script file and running any code it is told to run. However other things can cause that to take a long time.
Here's a dumb non-programming explanation that might make this whole discussion a little clearer:
Let's say you want to play a game of cards, but to start all the cards need to be in the correct Ace-to-King order by suit. Let's say at 12:00pm you drop all the cards on the table in a random pile and start sorting them. Your method is just to hunt for the very first card you want out of all 52 and then go on from there. In perfect conditions this process should take about 5 minutes. However while you're sorting your kid interrupts you asking you to fix him lunch, or pour him some water, or take him to the bathroom. Maybe the dog needs to be let out too. You also get a couple phone calls. Everyone of those things divides your attention or takes you away from the table where you can sort the cards. You finally finish at 12:30pm and can start your game.
Looking just at the clock it took you 30 minutes to sort your cards (initially execute the script) but during that time you were really only sorting cards for 5 or 6 minutes, and the rest of the time you were blocked from doing the task (waiting on the HDD or other things).
Now, you can come up with a better algorithm for sorting cards using multiple piles for each suit that maybe only takes 2 minutes, but if you keep getting interrupted it still might take you 25 minutes before you can start your game. Certainly better, but still the algorithm you use to sort the cards isn't the primary problem. This is the fundamental disagreement that @regor and I are having :)
The "for dummys" answer is more clear than the link 8)
so you can't do nothing about "the kid being a kid" (the delay of the ui) but even that is true a better way for "sorting" cards will make things better.
If is possible to delay the initiation of the script until the load of the ui there will be a gain in time, or even better, doesn't start the script until is really call by a user action.
or not?
Basically, you want all your expensive UI related scripts and such to be deferred until at least this:
Not sure about SMP or jscript panel, but with core SDK: initquit service, the on_init() function is called for various components after most of the player is started up. Of course, then you're racing with every single component that also has an initquit service.
I make some test with differents scripts.
First I put away Library Tree, Album list panel and both bios
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 610 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 49 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 40 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 45 ms
User Interface initialized in: 0:01.181741
FFmpeg version: 4.3.1
Loading
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxxxxxxx
Startup time : 0:04.657253
Then I put a Biography v1.1.3 by WilB
Spider Monkey Panel v1.4.1 (Biography: Biography v1.1.3 by WilB): initialized in 602 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 119 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 47 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 44 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 41 ms
User Interface initialized in: 0:01.419245
Loading
FFmpeg version: 4.3.1
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxxxxxxxx
Startup time : 0:05.152534
Changing the WilB's bio to Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua
Spider Monkey Panel v1.4.1 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 11790 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 127 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 41 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 36 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 39 ms
User Interface initialized in: 0:12.463360
Loading
FFmpeg version: 4.3.1
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxxxxxx
Startup time : 0:15.990977
The difference with kgna_ua is appreciable.
And when I import my layout before the last test (during runtime, not for start up) the time of script was:
Spider Monkey Panel v1.4.1 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 78 ms
Spider Monkey Panel v1.4.1 (Biography: Biography v1.1.3 by WilB): initialized in 128 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 46 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 38 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 35 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 36 ms
Autobackup: Backed up 80 items to autobackup.20210514-032829.zip
So seems that if the scripts will load before the program get ready the impact will be less
Basically, you want all your expensive UI related scripts and such to be deferred until at least this:
Make sense.
Important things first then the rest
Basically, you want all your expensive UI related scripts and such to be deferred until at least this:
Not sure about SMP or jscript panel, but with core SDK: initquit service, the on_init() function is called for various components after most of the player is started up. Of course, then you're racing with every single component that also has an initquit service.
Dude. I think you fixed it
@kode54. Early returns are very promising. Gimme a bit to do some more testing though.
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Georgia: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 578 ms
User Interface initialized in: 0:02.061759
Okay,
@lender1257 and
@paregistrase can you install the attached version of FSM and tell me if your start up times improve substantially.
Root cause (I believe):
On DLL_PROCESS_ATTACH FSM was calling its own method InitializeSubsystems() which was in turn init'ing OLE, TypeLibEx, Scintilla, Gdi+, ATL, and the RichEditControl. As you can imagine, all of those are somewhat expensive as a bunch of DLLs need to be loaded in, etc.
What I did:
Saved off the HINSTANCE that DllMain receives and then deferred the call to InitializeSubsystems() as the very first line of on_init(). I'm seeing immediate 4-6x improvement in fb2k startup times, and in the 20-30 fb2k restarts since only seen a single slow startup in that entire time (that one was 20s total, but it felt more responsive than in the past -- and my machine is purposefully configured to murder fb2k startup for testing).
Possible this is just a bandaid, but if someone else verifies that this improves the problem I'll put up a PR tonight, and hopefully The_Qwertiest will see it.
Okay, @lender1257 and @paregistrase can you install the attached version of FSM and tell me if your start up times improve substantially.
Without album list, library tree and kgena_ua's bio
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 1952 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 110 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 50 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 44 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 47 ms
User Interface initialized in: 0:02.687677
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxx
Loading
FFmpeg version: 4.3.1
Startup time : 0:06.497853
before
Startup time : 0:15.990977
now
Startup time : 0:06.497853
Great difference
With the library tree is the same time with this new version but that I think is normal by the nature of the script but the UI seems to be drawn faster than before.
But this could be a subjetive apreciation by my side.
Great difference
Thanks for testing!
Great difference
Thanks for testing!
Repourting for duty, Captain 8)
Thanks to you, Clicking is easy
hello everyone
what a discussion! i am impressed.
obviously there are now several voices that something doesn't fit with panel or script.
thank you for your interest.
it takes a long time to load on both pcs. that means it can't be the computer alone. only the loading after windows startup. stopping fb and restarting is fast.
windows is always fully loaded, the HDD is running, no other programmes are active.
i did some tests. each with original panel + script and each with changed panel + changed script.
windows was always completely restarted between the tests.
changed kgena_ua-script - quote:
"I have added a counter to the main function, the first 2 times it's called it will do nothing. i.e. in startup it's called 2 times, so it will do nothing and load as fast as possible. The rest, it should work as is. (at least that what happens on my side) "
1 - SMP1.4.1 + kgena_ua (original)
2 - SMP1.4.2(dev...) + kgena_ua (original)
3 - SMP1.4.1 + kgena_ua (changed)
4 - SMP1.4.2 + kgena_ua (changed)
I can only leave the analysis and possible changes to the specialists among you.
Kind regards
Thanks, that's some very dedicated testing lender. Correct me if I'm wrong but it appears you are launching foobar by clicking on that John Mayer .mp3 right? Obviously that's a completely valid use case, but I'm wondering if that contributes to your slow down?
There are some issues with the dev component I built, as snotlicker has reported some crashes in the FSM thread that I can't reproduce. Hopefully we can figure out a workaround though.
From looking at those debugs and seeing the results I get with the original/modified component, what I believe is happening in is that at some point the UI thread gets starved and begins operating very slowly. It's somewhat of a race condition though, so that if your script finishes its initial load/execution in time it won't bog down the UI startup... which still might take some time. That's what the 4th log shows where this script loaded in .7 seconds, but the UI still took 8.5s to finish.
However if the slow down occurs while processing your script it MUST finish execution first to return control to the UI (that's the entire reason why the slow script popup occurs, because if the script is in an infinite loop the UI becomes unresponsive), so UI display can be delayed an additional long time because of it.
My changes demonstrably seemed to have made things better some of the time, but not all apparently. Also the crashes. I'll keep trying.
hello mordredKLB
not john mayer, but john mayall. i usually listen to slightly older music. :D
no, i always press the pause button before i quit fb and the next time i start it.
yes, your change to SMP only made a marginal difference; the script change saved the most time.
a little hardware info:
my 2 pcs were originally windows 8.1 machines. now i'm on windows 10 (20H2). of course the loading process from w8.1 to w10 has slowed down, but i always wait until everything is completely loaded.
the hardware data of my desktop you can find in the picture
greetings
The changed script he posted adds a simple hack to not fire on metadb on startup. And as I said... it fixes the main problem with the script loading (1/3 of original time), applies in all cases, does not require any exotic change on SMP (although it would be great if it finally works) and relies on simply good coding practices... (which also took 1 minute to apply)
Mordred I appreciate what you tried to improve on SMP, but really... you have tried to solve it using a sledgehammer to crack nuts, without solving the more obvious problems. Hope kgena takes into consideration rewriting the on_meta_db routine, or at least adds a check to not fire it on startup.
hello mordredKLB
not john mayer, but john mayall. i usually listen to slightly older music. :D
no, i always press the pause button before i quit fb and the next time i start it.
yes, your change to SMP only made a marginal difference; the script change saved the most time.
Sorry, misread :D
Appeared to be a 4x improvement which is pretty solid and in line with what I'm seeing, but UI time was only improved about a second which is disappointing as mine also drastically improved, even better than the results paregistrase saw. Since I basically couldn't make fb2k start faster than 15-20 seconds (again under tortuous, non-typical conditions) and now it almost always starts in under 5.
Mordred I appreciate what you tried to improve on SMP, but really... you have tried to solve it using a sledgehammer to crack nuts, without solving the more obvious problems. Hope kgena takes into consideration rewriting the on_meta_db routine, or at least adds a check to not fire it on startup.
:D
As I mentioned much earlier this script is easily band-aided in some ways (although didn't you say 400ms was a "waste" just the other day?) but other scripts can't be. I don't even care about this script because I don't use a biography panel (no offense intended to kgena who put together a very nice looking component).
It's that this and other scripts had no issues at startup with jscript_panel, and they do with FSM. That's the problem that needs to be solved. "Script authors must write all code perfectly to avoid serious slowdowns at startup if they want to use FSM" isn't the best message. Not everyone is an advanced JS coder like yourself, and frankly they shouldn't have to be particularly when this stuff is near instantaneous at every other time except startup.
@paregistrase and
@lender1257 I uploaded a new version that seems safer over in the SMP thread (https://hydrogenaud.io/index.php?topic=116669.msg997685#msg997685). I think I'm still seeing drastic speed improvements but this point I've pulled so many different levers and tested in so many environments/configs that I can't even tell. :D
One question for you Lender. In the Media Library, how many different paths are you watching (i.e. how many entries are in that dialog). I have a weird feeling that it might be related to why you and I see slowdowns at startup, but marc, regor, kgena and others don't seem to. Probably wrong, but I'm curious.
@paregistrase and @lender1257 I uploaded a new version that seems safer over in the SMP thread (https://hydrogenaud.io/index.php?topic=116669.msg997685#msg997685). I think I'm still seeing drastic speed improvements but this point I've pulled so many different levers and tested in so many environments/configs that I can't even tell. :D
No problem. I will make 6 test.
3 with Library Tree changing between the 3 Bio script (Biography v1.1.3 by WilB, Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua and Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua with profiler (on_metadb_changed modified by regor)
Another 3 without Library tree.
Here we go:
With Library Tree and Biography v1.1.3 by WilB
Components loaded in: 0:00.278363
Configuration read in: 0:00.043803
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11521 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography v1.1.3 by WilB): initialized in 145 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 116 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 64 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 35 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 38 ms
User Interface initialized in: 0:14.191651
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxxxx
Loading
FFmpeg version: 4.3.1
Startup time : 0:17.820130
With Library Tree and Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua
Components loaded in: 0:00.297465
Configuration read in: 0:00.040476
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxxx
Watching: Z:\media\xxxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11439 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 2040 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 133 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 102 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 42 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 43 ms
User Interface initialized in: 0:14.211291
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxxx
Loading
FFmpeg version: 4.3.1
Startup time : 0:18.321023
With Library Tree and Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua with profiler (on_metadb_changed modified by regor
Components loaded in: 0:00.311536
Configuration read in: 0:00.041207
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11387 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09: profiler (on_metadb_changed): 1388ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 2016 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 93 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 98 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 42 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 35 ms
User Interface initialized in: 0:14.092111
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxx
FFmpeg version: 4.3.1
Loading
Startup time : 0:17.885960
A little bit slower than Spider Monkey Panel v1.4.1
User Interface initialized in: 0:12.522745
Now removing Library Tree
With Biography v1.1.3 by WilB
Components loaded in: 0:00.313590
Configuration read in: 0:00.036073
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography v1.1.3 by WilB): initialized in 20278 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 136 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 65 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 39 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 43 ms
User Interface initialized in: 0:20.987454
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getRecentTracks&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=lovecraft_last&limit=200&format=json&from=1620993977&page=1
FFmpeg version: 4.3.1
Loading
Startup time : 0:24.645305
With kgena_ua's bio
Components loaded in: 0:00.456232
Configuration read in: 0:00.148819
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 22202 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 95 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 64 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 42 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 74 ms
User Interface initialized in: 0:22.916863
FFmpeg version: 4.3.1
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxx
Loading
Startup time : 0:27.181862
With regor modification of kgena_ua's bio
Components loaded in: 0:00.285895
Configuration read in: 0:00.036177
foobar2000 v1.6.5 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09: profiler (on_metadb_changed): 5614ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 17251 ms
Musicbrainz: Invalid/missing MBID
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 85 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 70 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 44 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 53 ms
User Interface initialized in: 0:17.947067
Loading
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxxx
FFmpeg version: 4.3.1
Startup time : 0:21.618035
Like before if any bios script is the first load the start up times are worse than having Library Tree.
Removing Library Tree and the new version of Spider Monkey is even worse and the warning window of slow script pop up in all of then before the ui was drawn (This never happen to me before, I saw the warning sometimes but never at start up)
Sorry to say that this build (at least in my machine) is slower than your previous modification (that doesn't produce any crash on my side) or the original
Hello everybody. Thank you for participating in the discussion.
What do I have
Spider Monkey Panel v1.4.1: profiler (on_metadb_changed): 146ms
Spider Monkey Panel v1.4.1 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 208 ms
......
Startup time : 0:01.619760
and
Spider Monkey Panel v1.4.2-dev+ce39bb09: profiler (on_metadb_changed): 146ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 208 ms
......
Startup time : 0:01.552362
I need help.
Please write in simple language and with examples, this is better for me to understand.
Hope kgena takes into consideration rewriting the on_meta_db routine, or at least adds a check to not fire it on startup.
In what ways can this be done.
by kgena_ua with profiler (on_metadb_changed modified by regor
Where can i see it modified script.
Sorry. I found it. It bio_test.js
Spider Monkey Panel v1.4.2-dev+ce39bb09: profiler (on_metadb_changed): 146ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 207 ms
...
Spider Monkey Panel v1.4.2-dev+ce39bb09 (bio_test _by_regor: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 170 ms
...
Startup time : 0:01.794936
Hello everybody. Thank you for participating in the discussion.
by kgena_ua with profiler (on_metadb_changed modified by regor
Where can i see it modified script.
From a regor's post in this thread.
https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832 (https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832)
paregistrase, i see.
Now with SMP 1.4.1
Spider Monkey Panel v1.4.1: profiler (on_metadb_changed): 146ms
Spider Monkey Panel v1.4.1 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 208 ms
....
Spider Monkey Panel v1.4.1 (bio_test _by_regor: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 169 ms
...
Startup time : 0:01.794910
code by regor faster
Sorry to say that this build (at least in my machine) is slower than your previous modification (that doesn't produce any crash on my side) or the original
Hey, thanks for testing. The problem is once the slow script warning pops up your timings are all bad. When that warning appears really ALL script processing stops, but the timer doesn't. If you left the warning up for an hour, and then came back and clicked okay, it would say the script took an hour to load. Increase the slow script timeout in Advanced >> Tools >> FSM >> Performance, to 20-30 seconds or so and maybe do a few more tests? Also probably set it back to 5 or 10 after you're done otherwise you'll be sitting around forever in the case of an infinite loop :)
Sorry to say that this build (at least in my machine) is slower than your previous modification (that doesn't produce any crash on my side) or the original
Hey, thanks for testing. The problem is once the slow script warning pops up your timings are all bad. When that warning appears really ALL script processing stops, but the timer doesn't. If you left the warning up for an hour, and then came back and clicked okay, it would say the script took an hour to load. Increase the slow script timeout in Advanced >> Tools >> FSM >> Performance, to 20-30 seconds or so and maybe do a few more tests? Also probably set it back to 5 or 10 after you're done otherwise you'll be sitting around forever in the case of an infinite loop :)
I tried to click it as far as pop up but you're right, is a human factor.
No problem making more test, tell me if you need other specific conditions and the test to repeat and i be glad to proceed.
From a regor's post in this thread.
https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832 (https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832)
code by regor faster
Guys, regors code isn't faster. He made zero optimizations, just logged out how long two functions take (if they are slow) :D
It's the exact same code as kgena last copy in here otherwise.
From a regor's post in this thread.
https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832 (https://hydrogenaud.io/index.php?action=dlattach;topic=114686.0;attach=19832)
code by regor faster
Guys, regors code isn't faster. He made zero optimizations, just logged out how long two functions take (if they are slow) :D
It's the exact same code as kgena last copy in here otherwise.
So, no need to test both.
Better the original or the modified?
So, no need to test both.
Better the original or the modified?
I care about the one that is the slowest because that's what I'm trying to improve on. :)
@kgena_ua I made some modifications to your script to improve performance.
Biggest one is this, on_metadb_changed only updates bio data if the current metadb (either currently playing or playlist selected) is in the handle_list:
function on_metadb_changed(handles, fromhook) {
if (!panel_on) return;
if (!metadb) return;
if (handles.Count > 0) {
handles.Sort();
if (handles.BSearch(metadb) > -1) {
// only update data if current metadb is in list of handles
updateBioData();
}
}
}
function updateBioData() {
ini_data();
// continues as normal from here
Then I replaced all calls of "on_metadb_changed()" that you were manually making with "updateBioData()" so they still get called everytime.
Lastly I replaced the duplicate remap artist call in ini_data:
meta_artist = remap_artist(tf_artist);
meta_album = remap_album(meta_artist, tf_album);
There are probably some other optimizations you could make (I didn't look through it much) but that's going to take care of the most important things.
So, no need to test both.
Better the original or the modified?
I care about the one that is the slowest because that's what I'm trying to improve on. :)
Not contradictory at all 8)
Second round. Reboot in between timer 30 sec
With library tree Biography: Biography v1.1.3 by WilB
Components loaded in: 0:00.279650
Configuration read in: 0:00.060239
foobar2000 v1.6.6 beta 8 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11437 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography v1.1.3 by WilB): initialized in 147 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 153 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 59 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 36 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 37 ms
User Interface initialized in: 0:12.405669
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxx
FFmpeg version: 4.3.1
Loading
Startup time : 0:16.081855
With library tree Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua
Components loaded in: 0:00.285051
Configuration read in: 0:00.052151
foobar2000 v1.6.6 beta 8 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Library Tree: Library Tree v2.1.3 by WilB): initialized in 11463 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 1536 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 108 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 66 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 41 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 48 ms
User Interface initialized in: 0:13.709322
FFmpeg version: 4.3.1
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxx
Loading
Startup time : 0:17.813086
Auto Check for Updates: next check is scheduled for 2021-05-20 23:46:44
No library Tree Biography: Biography v1.1.3 by WilB
Components loaded in: 0:00.282568
Configuration read in: 0:00.049214
foobar2000 v1.6.6 beta 8 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography v1.1.3 by WilB): initialized in 16335 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 149 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 44 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 40 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 42 ms
User Interface initialized in: 0:17.043556
FFmpeg version: 4.3.1
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxx
Loading
Startup time : 0:20.840203
Auto Check for Updates: next check is scheduled for 2021-05-20 23:46:44
Autobackup: Backed up 80 items to autobackup.20210515-085516.zip
No library Tree Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua
Components loaded in: 0:00.285547
Configuration read in: 0:00.042126
foobar2000 v1.6.6 beta 8 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Biography: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v14042021 by kgena_ua): initialized in 12808 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Musicbrainz: Musicbrainz by marc2003): initialized in 112 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 81 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 37 ms
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 40 ms
User Interface initialized in: 0:13.487204
Loading
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxx
FFmpeg version: 4.3.1
Startup time : 0:17.611214
Auto Check for Updates: next check is scheduled for 2021-05-20 23:46:44
Autobackup: Backed up 80 items to autobackup.20210515-090015.zip
A little better.
But the Pattern seems similar. Faster when library tree is present.
Great work. Seems like the test component made very little difference for you. You can also see that which script gets caught in the UI thread starvation slowdown changes every time which was kind of my original point in this whole discussion: that kgena's script wasn't really the culprit, but whatever.
I guess you didn't compare those times vs the stock 1.4.1 FSM (unless they're in a different post?), but my guess is it probably doesn't change much. Bummer. It definitely appears to be a lot faster on my machine but there's so much variation it might just be random noise. 😕
Great work. Seems like the test component made very little difference for you. You can also see that which script gets caught in the UI thread starvation slowdown changes every time which was kind of my original point in this whole discussion: that kgena's script wasn't really the culprit, but whatever.
I guess you didn't compare those times vs the stock 1.4.1 FSM (unless they're in a different post?), but my guess is it probably doesn't change much. Bummer. It definitely appears to be a lot faster on my machine but there's so much variation it might just be random noise. 😕
This (https://hydrogenaud.io/index.php?topic=114686.msg997604#msg997604)
This is the first before testing differents versions.
Was made with my previous setup
1.4.1 library tree and WilB's bio.
User Interface initialized in: 0:12.522745 vs Startup time : 0:17.820130
In my machine your new version is slower but your previous version was faster than stock and didn't produced crashes.
Like you say there some many noise and different setups to make a clear clonclusion.
Thats why I asked you if there are any specific conditions to reduce this noise and gives more clear results.
A clean portable install with only spider monkey, no library and only one script loaded maybe?
Don't know, say me....
In my machine your new version is slower but your previous version was faster than stock and didn't produced crashes.
I would expect the first dev version to be faster than the 2nd, because I had to move things back up in the startup stack. If that really did make a difference it probably went right back to slowing things down. Unless lender sees any improvements this experiment is probably DOA. I still think it's faster on my machine, but I barely know what I'm doing anymore. Probably placebo or I changed something else.
A clean portable install with only spider monkey, no library and only one script loaded maybe?
In my experience this is usually enough to get the script to finish execution very very fast (<1s in my test today). But that's not super helpful since nobody runs fb2k like that.
BTW,
@regor will probably think this is the ultimate shitpost, but I just keep beating the same dead horse:
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 2262 ms
User's music_graph_descriptors - File loaded: D:\Source\foobar2000_portable\scripts\SMP\xxx-scripts\helpers\music_graph_descriptors_xxx_user.js
User's music_graph_descriptors has been loaded but it contains no changes... using only default one.
music_graph_descriptors_xxx: Basic debug enabled
music_graph_descriptors_xxx: Advanced debug enabled
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Search by Distance Buttons: Search by Distance Buttons by xxx): initialized in 5731 ms
User Interface initialized in: 0:08.871954
I'll save him the speech about needing to spend time optimizing his code though. ;)
Great work. Seems like the test component made very little difference for you. You can also see that which script gets caught in the UI thread starvation slowdown changes every time which was kind of my original point in this whole discussion: that kgena's script wasn't really the culprit, but whatever.
This makes me thinks when I saw it.
The script that its first loaded takes a long time. And no mathers if is a script that do a lot of things (library tree) or one that in theory would not have to do much like a panel of bio with the info to show downloaded already.
The script that its first loaded takes a long time. And no mathers if is a script that do a lot of things (library tree) or one that in theory would not have to do much like a panel of bio with the info to shown downloaded already.
That's what I've been trying to say, and why approached it from the other non-script side.
When loaded after UI is visible:
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Search by Distance Buttons: Search by Distance Buttons by xxx): initialized in 67 ms
When it's 100x slower at startup, it's probably not the script's fault :) Ultimately I think FSM just needs to load more stuff than JSP did, and if your script doesn't win the race to finish before stuff starts being loaded and execution slows to a crawl then you're out of luck. FSM would need a major refactor to solve that one (delaying loading until something is actually used) and I'm not competent enough to do that.
In my machine your new version is slower but your previous version was faster than stock and didn't produced crashes.
I would expect the first dev version to be faster than the 2nd, because I had to move things back up in the startup stack. If that really did make a difference it probably went right back to slowing things down. Unless lender sees any improvements this experiment is probably DOA. I still think it's faster on my machine, but I barely know what I'm doing anymore. Probably placebo or I changed something else.
A clean portable install with only spider monkey, no library and only one script loaded maybe?
In my experience this is usually enough to get the script to finish execution very very fast (<1s in my test today). But that's not super helpful since nobody runs fb2k like that.
BTW, @regor will probably think this is the ultimate shitpost, but I just keep beating the same dead horse:
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Last.fm Bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 2262 ms
User's music_graph_descriptors - File loaded: D:\Source\foobar2000_portable\scripts\SMP\xxx-scripts\helpers\music_graph_descriptors_xxx_user.js
User's music_graph_descriptors has been loaded but it contains no changes... using only default one.
music_graph_descriptors_xxx: Basic debug enabled
music_graph_descriptors_xxx: Advanced debug enabled
Spider Monkey Panel v1.4.2-dev+ce39bb09 (Search by Distance Buttons: Search by Distance Buttons by xxx): initialized in 5731 ms
User Interface initialized in: 0:08.871954
I'll save him the speech about needing to spend time optimizing his code though. ;)
You developers are bad people. :))
@MordredKLB2 tests: SMP timer = 5 seconds
pc completely rebooted each time
1 - popup 1x
2 - popup 2x
variant 2 took an eternity
@paregistrase
please test with the version from 2021-05-01 from kgena_ua - thanks
@paregistrase
please test with the version from 2021-05-01 from kgena_ua - thanks
Give me a link. No problem.
kgena_ua - version 2021-05-01 (this thead,, page 6, Post #149)
sorry, I'm too stupid to put in a link.
Components loaded in: 0:00.311639
Configuration read in: 0:00.050435
foobar2000 v1.6.6 beta 8 [portable]
Shell hook registration failure: 0
Watching: Z:\media\xxxxx
Watching: Z:\media\xxxxx
Spider Monkey Panel v1.4.1 (Biography (overriden by script): Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 12759 ms
Spider Monkey Panel v1.4.1 (Musicbrainz: Musicbrainz by marc2003): initialized in 124 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 59 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 37 ms
Spider Monkey Panel v1.4.1 (Last.fm Similar Artists + User Charts + Recent Tracks: Last.fm Similar Artists + User Charts + Recent Tracks by marc2003): initialized in 51 ms
User Interface initialized in: 0:13.456856
FFmpeg version: 4.3.1
Loading
foo_enhanced_playcount: loaded
Querying last.fm: http://ws.audioscrobbler.com/2.0/xxxxx
Startup time : 0:17.284290
Thanks, MordredKLB, paregistrase.
One question. Without optimization, I have
Spider Monkey Panel v1.4.1 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 281 ms
281 mswhy do you have
12759 ms... 2262 ms .... 12808 ms ......
Thanks, MordredKLB, paregistrase.
One question. Without optimization, I have
Spider Monkey Panel v1.4.1 (bio: Biography, Covers, Albums, Title, Similar artist, Lyrics info.www.last.fm v01052021 by kgena_ua): initialized in 281 ms
281 ms
why do you have
12759 ms. or 2262 ms. or 12808 ms ......
.
When the script take a lot of time is when is running first.
When Library tree is the first executed the times of your script are low.
This is consistent in every test i made. (is the same for the other bio script too)
the script that is executed first takes the impact.
We think that the long start ups are more related with the way SMP starts and not a problem with a specific script.
Maybe MordredKLB can gives you a more detailed answer. I'm only a user I have no idea of programing
He call it "UI thread starvation". God kill me if i know what this meant exactly
When Library tree is the first executed the times of your script are low.
Library tree ?
But 281 ms and 12759 ms. or 2262 ms. or 12808 ms ......
what is the connection
When Library tree is the first executed the times of your script are low.
Library tree ?
Another script for SMP that at least in my setup is executed by SMP always in first place.
When is not present the first executed are yours or the other bio.
When is present and executed first your script run in a blink.
But when is removed yours is the first executed and takes a lot to finished.
Don¡t know why but this always happend (at least in my system)
@paregistrase I noticed in another thread that you run foobar in Linux. Is this the setup in which you provided the measurements?
When Library tree is the first executed the times of your script are low.
But 281 ms and 12759 ms. or 2262 ms. or 12808 ms ......
what is the connection
Well. all of them. :) depending of the order that was executed
The connection?
That is the big question.
Quoting MordredKLB:
"Seems like the test component made very little difference for you. You can also see that which script gets caught in the UI thread starvation slowdown changes every time which was kind of my original point in this whole discussion: that kgena's script wasn't really the culprit, but whatever."
@paregistrase
I noticed in another thread that you run foobar in Linux. Is this the setup in which you provided the measurements?
Yes
Its the only one I have
I'm poor but accept donations :))
I'm also poor, so I can't help you with that.
I wonder if running under Wine makes a difference 🤔
I'm also poor, so I can't help you with that.
I wonder if running under Wine makes a difference 🤔
it is very possible, wine has its limitations.
If a windows user could make a similar test we will have an answer.
hello kgena_ua
please create the option at "similar artist" whether to be saved in "history" or not
thank you
hello kgena_ua
please create the option at "similar artist" whether to be saved in "history" or not
thank you
i will do it and do some fixes
hello kgena_ua
something else i noticed:
whenever last-fm is accessed, the rest of the plugins are completely blocked for the duration of the access.
only the music continues to play.
column-ui (cursor-skip to current track), runtime display, vu-meters ... all are blocked.
i use smp 1.4.1 and your script from 2021/05
maybe you'll find some irregularities
thx
is there a need to view covers in the biography panel ?
is there a need to view covers in the biography panel ?
for me no
Biography, Albums, Title, Similar artist, Lyrics info.www.last.fm
version: 02082021
Optimization.
The saved data is not compatible with the new version
hello kgena_ua
new version tested (with smp 1.4.1):
loading time has improved. (on my old pc)
no more blocking with lastfm-access
"similar artists" now also fits
good work - thank you
hello kgena_ua
if the field with the red border is "header 2", then the colour selection does not work here.
if the field with the red border is "header 2", then the colour selection does not work here.
hello kgena_ua lender1257
works right:
thanks for the explanation
Biography, Albums, Title, Similar artist, Lyrics info
version: 25082021
Spider Monkey Panel.
Add: allmusic.com review.
reload menu "Properties"
hello kgena_ua
thanks for allmusic - good work.
problem: remap artist + album
allmusic may save differently than lastfm.
suggestion: (maybe you have a better one)
in the very front of the two remap-txt-files insert the separation
lastfm#...
allmusc#...
for this you also need 2 new remap entries in the contextmenue
then select the correct entry when reading.
PS: if you are still adding this,
can you please insert lastfm# (allmusic does not exist yet) the first time, automatically in both files
thanks
I'm sorry I can't reply to private messages yet.
Biography, Albums, Title, Similar artist, Lyrics info
version: 03052022
Spider Monkey Panel v.1.6.1.
Optimization.
Bugfix.
Improvements.
This version is not compatible with the previous version.
Hi :) @kgena_ua.
Thanks for good work.
I have one request.Would you please change the default font?
(I know how to change it. from the property.)
Yu Gothic UI
(https://i.imgur.com/FstSkwm.png)
Air KEN, thanks.
Change Font name: use "Text" menu.
Change Font size: mouse wheel + Shift over selected text.
Change Font сolor: use "Custom Colors" menu.
Сustomize the main menu for yourself using the menu "Main menu setting".
Thank you for your reply.
I know that.
I have a weak impression, so could you change the default font (Arial)? ::)
As long as you can do it yourself.
I'm sorry if I understand you correctly. English is not my native language.
hi kgena_ua
nice to have you back.
Version from 03.05.:
the colour set for "selected text" is not displayed, but that of "text 2".
I personally like it better when there is a blank line before "last.fm/allmusic" and after.
is it possible to read the user settings (font, size, colour, ...) first and then use them in the new script ?
This would save you a lot of work.
greetings
hi kgena_ua
nice to have you back.
lender1257. Hi.
I'm not going anywhere. Just a difficult time for my country.
The error will be corrected.
Air KEN, Foobar2000 default font will be added.
Changed the search method from the history list. So I think it will be better.
Example of matching by "BLU"
What a wonderful evening. And at night you expect the arrival of rockets and bang bang bang bang.... Such booming sounds. Scary, yes. Scary - no, because we are right.
The worst thing is that children are dying.
Is it possible to have 2 biography. One for the artist and one for the performer ?
Ex : Mozart and Bernstein as performer .
Thanks .
Hello.Could you please convert the new script to a suitable version for foo_jscript_panel3-3.3.2? (https://github.com/jscript-panel/release/releases,for Foobar2000 2.0 -x64,foo_spider_monkey_panel.dll (https://github.com/TheQwertiest/foo_spider_monkey_panel/releases) has not been updated after 1.5 years).Thanks
Hello. Wish your everything are all right now!
Hi everyone,
Is there a way to disable the ability to drag&drop the text around?
This was never answered. I'd like to know this as well.
I need this as a separate component for 64 bit foobar :'(
allmusic is showing 'Text not found'. Has something on the site changed?
I don't use this but my own script is borked which means the site has changed.
Tbh, I don't think it's fixable. If you browse the website in a browser and read any review, when you right click and "view source", the content is not there. I guess it's injected after the initial page load by some fancy script but I really have no idea what I'm talking about. I know less than nothing about the "web". :P
Ok, thanks for the info. I just noticed it's also not working on WilB's Bio.