-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve BO speed by removing menu images #8780
Conversation
Another file_exists call we can remove after for the image. |
$path_img = _PS_MODULE_DIR_.$tab['module'].'/'.$tab['class_name'].'.png'; | ||
// Relative link will always work, whatever the base uri set in the admin | ||
$img = '../modules/'.$tab['module'].'/'.$tab['class_name'].'.png'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By seeing these lines removed, I'd say you remove a feature.
Module developers can add their AdminModuleController tab icon in the root folder of their module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but is this really used and needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Forwarded an email about that)
Images are not used from version 1.5 of PrestaShop, of course you could add them but it's a common to use font-icons now instead, for me it's a good change 👍 |
Ok cool, thanks for you answer @kpodemski. And in fact, more you have links in the menu (installed module, etc...) more you gain speed. |
Yeah, totally, also - if someone still want to use an image, there's still an option to do that via CSS, so you shouldn't worry about acceptation of this PR @Quetzacoalt91 ;) |
But you know we have to respect the semver rules, we cannot remove features like this in a patch version (1.7.3.0 won't have this PR, even if we approve it immediately). I know the consequences may be awesome, but the module related code is the only one I'd keep, because we can't breaks things for our contributors without prior notice. |
Ok, but this feature is not available anymore since... i don't remember :D You can try to add this image and you will not see it in back-office anyway... so yeah, we scan for the images but those images are not displayed... |
I think that if we ever decide to keep this feature it should be done via config instead of via filesystem probing, because as blackfire shows, it's extremely slow :) |
Even if a module has an image, we don't use it in the template file. |
Both SF and legacy? |
@alegout exactly, it's not used anymore for years... @Quetzacoalt91 yes, it's not used anymore, even in PrestaShop 16... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go on then, I'll trust what you guys say.
yes @Quetzacoalt91 checked in legacy and SF themes. |
aaaand, here is a proof about 1.6: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's part if AdminController, this have a positive performant interest for every page of back office :-)
👍 for me too, maybe explain what need to be tested can help for QA validation ;)
Thank you @alegout |
Important guidelines
This change is