Jump to content

Recommended Posts

Posted
5 minutes ago, yocker said:

我认为已经没有太多性能可以提升了。最需要处理的两个主要问题是:系列剧集的合并过程,因为在不使用“简化”模式的情况下,需要检查整个系列中的所有剧集;还有就是自动生成剧集的过程。
我实在无法大幅修改这个绘图效果,因为绘图是用 SkiaSharp 工具制作的,而不是由我亲自设计的。

要加快插件的运行速度,最好的方法就是为电视剧和合集使用“精简模式”。
不过,这对你来说并没有太大的影响,因为你只是使用评分来进行判断而已。

我正在研究一些可以提高性能的新方案,不过可用的选项已经越来越少了。

Storing images locally for reuse is already an excellent solution; the app no longer crashes when opening the media library.

yocker
Posted
4 minutes ago, Ansell said:

Storing images locally for reuse is already an excellent solution; the app no longer crashes when opening the media library.

It always did that, Emby hands EmbyIcons a poster and tells it to enhance it, EmbyIcons after that hands it back to Emby that then placed it in cache and used it for libraries.
I believe the problem was that i had it load x amount of posters into memory for processing but something would go wrong.
Either the limit didn't work as it should or the memory didn't get released.

I will have to look into that at some point.

Posted
13 minutes ago, yocker said:

It always did that, Emby hands EmbyIcons a poster and tells it to enhance it, EmbyIcons after that hands it back to Emby that then placed it in cache and used it for libraries.
I believe the problem was that i had it load x amount of posters into memory for processing but something would go wrong.
Either the limit didn't work as it should or the memory didn't get released.

I will have to look into that at some point.

Version 5.61.1.0 seems great so far; I wonder how it will behave after restarting the Emby server.

yocker
Posted
3 minutes ago, Ansell said:

Version 5.61.1.0 seems great so far; I wonder how it will behave after restarting the Emby server.

After a reboot it will have to rebuild the cache, this will be fast though and no redrawing of posters will happen.

There is one last thing i thinking of adding back to the plugin but i'm a bit hesitant about it as it might have been part of the problem on your system.
In short, it shortens the amount of time between each poster being drawn on.
It could gain a little performance. 

Posted
1 minute ago, yocker said:

重启后,系统需要重新构建缓存数据。不过这个过程会非常快,而且不会重新绘制任何海报。

还有一件事,我想在插件中添加进去。不过我有点犹豫,因为这件事可能是你系统出现问题的原因之一。
简而言之,这缩短了每次需要绘制新图像之间的时间间隔。
它的性能可能会有所提升。

In reality, relying on disk I/O is indeed the best approach, given that Emby's memory management and its use of SQLite are notorious issues. Since Luke has consistently been reluctant to switch to PostgreSQL and Redis, other plugins really shouldn't consume memory; otherwise, the risk of a system crash becomes extremely high.

Posted
2 minutes ago, yocker said:

重启后,系统需要重新构建缓存数据。不过这个过程会非常快,而且不会重新绘制任何海报。

还有一件事,我想在插件中添加进去。不过我有点犹豫,因为这件事可能是你系统出现问题的原因之一。
简而言之,这缩短了每次需要绘制新图像之间的时间间隔。
它的性能可能会有所提升。

Rendering the image isn't difficult; the challenge lies in having to redraw it every time—though that issue seems to have been resolved. Now, all that's needed for perfection is to reduce memory consumption. The need to redraw it every time was the biggest problem, but it appears that issue has already been solved.

Posted
2 hours ago, yocker said:

After a reboot it will have to rebuild the cache, this will be fast though and no redrawing of posters will happen.

There is one last thing i thinking of adding back to the plugin but i'm a bit hesitant about it as it might have been part of the problem on your system.
In short, it shortens the amount of time between each poster being drawn on.
It could gain a little performance. 

I've discovered a new issue: you cannot save any plugin settings, otherwise all your images will have to be reprocessed.

yocker
Posted (edited)
26 minutes ago, Ansell said:

I've discovered a new issue: you cannot save any plugin settings, otherwise all your images will have to be reprocessed.

That is by design. 
Otherwise any new icon positions wouldn't be shown and all posters would be stale.

I'm planning on making it profile dependant so only affected libraries gets updated and also only posters with relevant information gets updated. 

The last one might take a while to do.

Edited by yocker
Posted
1 hour ago, yocker said:

这是有意为之。
否则,任何新的图标位置都不会被显示出来,所有海报都会显得过时了。

我打算让更新效果取决于特定的配置文件,这样只有受影响的库才会被更新,而且只有包含相关信息的海报才会被更新。

最后一个可能需要一些时间来完成。

Current efforts should focus on avoiding redundant work that wastes performance.

Posted
4 hours ago, yocker said:

That is by design. 
Otherwise any new icon positions wouldn't be shown and all posters would be stale.

I'm planning on making it profile dependant so only affected libraries gets updated and also only posters with relevant information gets updated. 

The last one might take a while to do.

It would be best to limit the scope to a specific timeframe—for instance, simply refreshing the 30 most recently added media items. Additionally, there should be a button allowing administrators to manually clear old records and perform a full rebuild, or to rebuild specific media libraries; ideally, however, there should be no option to trigger a rebuild of *all* images.

yocker
Posted
1 hour ago, Ansell said:

It would be best to limit the scope to a specific timeframe—for instance, simply refreshing the 30 most recently added media items. Additionally, there should be a button allowing administrators to manually clear old records and perform a full rebuild, or to rebuild specific media libraries; ideally, however, there should be no option to trigger a rebuild of *all* images.

Then libraries would have multiple posters looking wrong and not be updated.
Better to split up the libraries them self to limit the amount of work the plugin has to do then.

Posted
17 minutes ago, yocker said:

那样的话,图书馆里的海报就会有很多看起来不正确的,而且这些海报也不会得到更新。
不如直接拆分这些库,这样就能减少插件需要处理的工作量。

Managing the media library this way adds complexity; regardless of the database size, the best approach is to handle the work in one go. The right choice is to be able to selectively clear a specific library, or to update the posters only after Emby has updated the metadata.

PeteGul
Posted (edited)

Hi, wonder what to download?

In this tread it is mentioned version 5.61.x.x, can't find it.
On GitHub I find version 2.7.5.0
And in Plugin section on the server, I find version 2.9.0.6...

This is really messing wiht my head.... The highest number is no where to be found, the GitHub version seems to be lower than the on in the Plugin section... What do I miss? 🤣

Edited by PeteGul
yocker
Posted
4 minutes ago, PeteGul said:

Hi, wonder what to download?

In this tread it is mentioned version 5.61.x.x, can't find it.
On GitHub I find version 2.7.5.0
And in Plugin section on the server, I find version 2.9.0.6...

This is really messing wiht my head.... The highest number is no where to be found, the GitHub version seems to be lower than the on in the Plugin section... What do I miss? 🤣

Thought i deleted all the versions on github.
Wanted to make it so people only download from the catalog.

Just download the latest stable from the catalog 5.61.0.0.
The betas are just that, betas. They should only be downloaded by people who (want to) beta test as they can have unfinished work in them.

Posted
29 minutes ago, yocker said:

我以为我已经删除了 GitHub 上所有的版本了。
希望人们只能从目录中下载内容。

请从目录中下载最新的稳定版本,版本号为 5.61.0.0。
这些测试版软件本质上还是测试版而已。只有那些愿意进行测试的人才应该下载它们,因为测试版中可能还包含一些未完成的功能。

I think there is still room for optimization in this area; no matter how powerful the server is or how up-to-date the data may be, the user experience will inevitably suffer significantly if high-speed loading cannot be guaranteed. Furthermore, since metadata doesn't change on a daily basis, Emby only needs to reprocess the specific media items being refreshed during the refresh cycle.

yocker
Posted (edited)
42 minutes ago, Ansell said:

Managing the media library this way adds complexity; regardless of the database size, the best approach is to handle the work in one go. The right choice is to be able to selectively clear a specific library, or to update the posters only after Emby has updated the metadata.

I don't like the idea of adding more settings, specially once that can confuse people by leaving none-updated posters in the libraries making people wonder what's wrong.

It only enhances posters that Emby needs per item basis. So let's say you scroll through a library then only the posters visible have been drawn.
If you don't scroll then no more posters will be enhanced as they were not needed by Emby.
The same is true for the EmbyIcons cache. If Emby doesn't ask for an item then that item will not be touched.
This saves a lot on resources and work. That is the most efficient way of doing it.

Your proposal would have Emby download posters and then have the plugin enhance them in the background even on posters that might never get used.
That would also turn EmbyIcons into a proactive plugin instead of a reactive one, something i don't want.
It would then have to keep running all the time to make sure posters are up to date.

If you really want all posters to be drawn in one go there is the pre-draw option in the scheduled tasks.

I'm planning looking into changing the drawing queue system and maybe work better with some scaling so smaller images will be worked with to speed it up (nobody uses 3000 x 4000 posters in the libraries anyway).
Also planning to add some extra information in the cache to work with so when icon positions have been changed in the settings only posters with those icons will be re-drawn.
This will help improve the re-drawing when settings have been saved by a descent amount depending on peoples libraries and settings.

In the end, it can be optimized more but the benefits are not game changing.
 

Edited by yocker
yocker
Posted

I could make a setting that disables EmbyIcons and makes it so that it only draws when the pre-draw scheduled task is run.
I just don't really see the upside to it and that has the disadvantage of drawing all posters in a library requiring a lot of resources when it runs.

Posted
9 minutes ago, yocker said:

我不喜欢增加更多设置的做法,因为那样会让用户感到困惑——因为图书馆中的图片可能没有任何更新,人们会不知道到底出了什么问题。

只要 Emby 根据每个项目的需求来提供相应的海报,那就更好了。所以,假设你浏览了一个库,那么只有那些可见的海报才会被显示出来。
如果你不滚动页面,那么就不会有更多的帖子得到增强,因为 Emby 认为这些帖子并不需要被增强。
对于 EmbyIcons 缓存来说也是如此。如果 Emby 没有请求某个物品,那么该物品就不会被处理或操作。
这样可以大大节省资源和人力成本。这是最高效的实现方式。

你的提议是让 Emby 下载海报文件,然后让该插件在后台对这些海报进行处理,即使这些海报可能永远都不会被使用。
那样做也会让 EmbyIcons 成为一个主动式的插件,而不是被动式的插件——而这是我不希望发生的。
那么,系统就需要持续运行下去,以确保海报信息保持最新状态。

如果你真的希望所有海报都能一次性绘制完成,那么可以在定时任务中设置预绘制选项。

我正在考虑修改绘图队列系统,或许可以通过一些优化来提高效率。这样,使用较小的图片就能更快地完成制作过程(反正图书馆里也没人使用 3000 x 4000 像素的大图片)。
我们还计划在缓存中添加一些额外的信息,以便在处理时能够考虑到图标位置在设置中的变化。这样一来,只有当那些带有特定图标的用户发布帖子时,图标才会被重新绘制。
这将有助于在设置保存后,根据不同用户的库和设置,使重新绘制过程更加优化。

最终,还可以进一步优化,不过这些改进所带来的好处并不具有革命性的意义。
 

Your proposed approach would actually turn a media library that loads in one second into one that takes ten seconds; that might not sound like much, but the difference in user experience is actually huge. Would you be interested in trying out my media library? I can give you a username and password so you can experience it firsthand.

Posted
6 minutes ago, yocker said:

我可以设置一个设置,使 EmbyIcons 功能被禁用,并且只有当预定的绘制任务执行时,才会进行绘制操作。
我实在不明白这样做有什么好处。而且,这种做法的缺点在于会吸引图书馆里所有的海报,从而需要消耗大量的资源。

You can also operate without scheduled tasks; this allows for the reuse of previously processed posters, and EmbyIcons will not redraw the posters unless Emby itself updates them.

Posted
16 minutes ago, yocker said:

I could make a setting that disables EmbyIcons and makes it so that it only draws when the pre-draw scheduled task is run.
I just don't really see the upside to it and that has the disadvantage of drawing all posters in a library requiring a lot of resources when it runs.

For instance, if I add movie "A" to my collection, EmbyIcon dynamically updates that movie's poster. This happens in real-time without sacrificing performance, as it avoids redrawing any unchanged images.

Posted
18 minutes ago, yocker said:

I could make a setting that disables EmbyIcons and makes it so that it only draws when the pre-draw scheduled task is run.
I just don't really see the upside to it and that has the disadvantage of drawing all posters in a library requiring a lot of resources when it runs.

I have sent you the server details, username, and password via private message so you can test it yourself.

yocker
Posted
10 minutes ago, Ansell said:

You can also operate without scheduled tasks; this allows for the reuse of previously processed posters, and EmbyIcons will not redraw the posters unless Emby itself updates them.

EmbyIcons only draws on posters that Emby asks for.
Saving settings will simply reset the cache (by design) to make sure no posters are stale but it will not start to enhance any posters before Emby asks for them.

Posted
1 minute ago, yocker said:

EmbyIcons 只会使用 Emby 所要求的海报来进行绘制工作。
保存设置只会重置缓存数据(这是系统的设计初衷),以确保没有任何海报信息变得过时。不过,在 Emby 开始处理这些海报之前,这些设置并不会对海报进行任何优化处理。

I saved the settings and disabled the debug logs about three hours ago; now, I am manually loading each image to ensure they are cached, which prevents the entire server from freezing up. There are still a few media libraries left to load. I’ve sent you my server login credentials via private message so you can log in and check the "综艺" library.

Posted
3 minutes ago, yocker said:

EmbyIcons only draws on posters that Emby asks for.
Saving settings will simply reset the cache (by design) to make sure no posters are stale but it will not start to enhance any posters before Emby asks for them.

You can also check out the other media libraries; accessing any one of them causes the media library server's CPU load to spike to 300%.

Posted
6 minutes ago, yocker said:

EmbyIcons 只会使用 Emby 所要求的海报来进行绘制工作。
保存设置只会重置缓存数据(这是系统的设计初衷),以确保没有任何海报信息变得过时。不过,在 Emby 开始处理这些海报之前,这些设置并不会对海报进行任何优化处理。

image.thumb.png.3e011e48fdbc206ef9e66bac46055015.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...