magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.59k stars 9.32k forks source link

[2.2.0-RC2.2] Static content deploy 'quick' strategy acts like 'standard' strategy #10674

Open hostep opened 7 years ago

hostep commented 7 years ago

Preconditions

Steps to reproduce

  1. Install Magento 2.2.0-rc22 or 2.2.7 or 2.3.0 or 2.4.3 or 2.4-develop using composer
  2. Add 2 language packs using composer: composer require honl/magento2-nl-nl imaginaerum/magento2-language-fr-fr
  3. Run bin/magento setup:upgrade
  4. Create 2 different storeviews in the backend and set the Locale configuration to Dutch (Netherlands) and French (France) for those 2 storeviews
  5. Reindex & flush the caches
  6. Run: rm -R var/view_preprocessed/* pub/static/* (so we start from a clean slate)
  7. Run: php bin/magento setup:static-content:deploy -s standard -f -t Magento/luma nl_NL fr_FR
  8. Results:
    
    Deploy using standard strategy
    frontend/Magento/blank/nl_NL            2083/2083           ============================ 100% %  24 secs
    frontend/Magento/blank/fr_FR            2083/2083           ============================ 100% %  26 secs
    frontend/Magento/luma/nl_NL             2098/2098           ============================ 100% %  29 secs
    frontend/Magento/luma/fr_FR             2098/2098           ============================ 100% %  29 secs

Execution time: 114.57253885269165

9. Run: `rm -R var/view_preprocessed/* pub/static/*` (so we start from a clean slate)
10. Run: `php bin/magento setup:static-content:deploy -s quick -f -t Magento/luma nl_NL fr_FR`
11. Results:

Deploy using quick strategy frontend/Magento/blank/nl_NL 2083/2083 ============================ 100% % 25 secs frontend/Magento/blank/fr_FR 2083/2083 ============================ 100% % 26 secs frontend/Magento/luma/nl_NL 2098/2098 ============================ 100% % 31 secs frontend/Magento/luma/fr_FR 2098/2098 ============================ 100% % 31 secs

Execution time: 119.81762409210205



### Expected result
1. As [advertised in the devdocs](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-static-deploy-strategies.html#static-file-quick), the quick strategy should run a lot faster then the standard strategy when using multiple locale's

### Actual result
1. Quick strategy behaves the same as standard strategy
misha-kotov commented 7 years ago

Thanks for reporting, internal issue is MAGETWO-72300

magento-engcom-team commented 5 years ago

Hi @TomashKhamlai. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

TomashKhamlai commented 5 years ago

@hostep, thank you for reporting this issue. We are closing this issue because it not reproducible anymore on 2.3.0. Here is what we have now on Magento 2.3.0 with Sample Data running inside docker.

./magento setup:static-content:deploy -s standard -f -t Magento/luma nl_NL fr_FR

Deploy using standard strategy
frontend/Magento/blank/nl_NL            2245/2245           ============================ 100% %  17 secs             
frontend/Magento/blank/fr_FR            2245/2245           ============================ 100% %  6 secs              
frontend/Magento/luma/nl_NL             2261/2261           ============================ 100% %  6 secs              
frontend/Magento/luma/fr_FR             2261/2261           ============================ 100% %  6 secs

Execution time: 56.262739896774

./magento setup:static-content:deploy -s quick -f -t Magento/luma nl_NL fr_FR

Deploy using quick strategy
frontend/Magento/blank/nl_NL            2245/2245           ============================ 100% %  < 1 sec             
frontend/Magento/blank/fr_FR            2245/2245           ============================ 100% %  < 1 sec             
frontend/Magento/luma/nl_NL             2261/2261           ============================ 100% %  0                   
frontend/Magento/luma/fr_FR             2261/2261           ============================ 100% %  1 sec

Execution time: 7.4362199306488
hostep commented 5 years ago

@TomashKhamlai: thanks for re-testing, I'll try to do it as well when I find some time. Just out of curiosity: you removed the contents of the var/view_preprocessed/ and pub/static/ directory in between the runs? (I forgot to add that to my initial post) Otherwise the second run will always be much faster.

hostep commented 5 years ago

@TomashKhamlai: I'm re-opening this, because it's not fixed. I also updated my initial post with more exacts steps to reproduce, forgot to mention you needed to remove the already generated assets in-between runs.

Here are the results in Magento 2.3.0 btw:

$ rm -R var/view_preprocessed/* pub/static/*

$ php bin/magento setup:static-content:deploy -s standard -f -t Magento/luma nl_NL fr_FR

Deploy using standard strategy
frontend/Magento/blank/nl_NL            2245/2245           ============================ 100% %  5 secs
frontend/Magento/blank/fr_FR            2245/2245           ============================ 100% %  7 secs
frontend/Magento/luma/nl_NL             2261/2261           ============================ 100% %  6 secs
frontend/Magento/luma/fr_FR             2261/2261           ============================ 100% %  7 secs

Execution time: 32.507457017899

$ rm -R var/view_preprocessed/* pub/static/*

$ php bin/magento setup:static-content:deploy -s quick -f -t Magento/luma nl_NL fr_FR

Deploy using quick strategy
frontend/Magento/blank/nl_NL            2245/2245           ============================ 100% %  5 secs
frontend/Magento/blank/fr_FR            2245/2245           ============================ 100% %  7 secs
frontend/Magento/luma/nl_NL             2261/2261           ============================ 100% %  6 secs
frontend/Magento/luma/fr_FR             2261/2261           ============================ 100% %  6 secs

Execution time: 31.373428821564

And just for completeness sake, I'm adding the results of compact strategy as well, which is significantly faster:

$ rm -R var/view_preprocessed/* pub/static/*

$ php bin/magento setup:static-content:deploy -s compact -f -t Magento/luma nl_NL fr_FR

Deploy using compact strategy
base/Magento/base/default               1616/1616           ============================ 100% %  3 secs
frontend/Magento/base/default           534/534             ============================ 100% %  1 sec
adminhtml/Magento/base/default          435/435             ============================ 100% %  1 sec
frontend/Magento/blank/default          108/108             ============================ 100% %  3 secs
frontend/Magento/luma/default           84/84               ============================ 100% %  0
frontend/Magento/blank/nl_NL            0/0                 >--------------------------- 0% %    0
frontend/Magento/blank/fr_FR            0/0                 >--------------------------- 0% %    0
frontend/Magento/luma/nl_NL             0/0                 >--------------------------- 0% %    0
frontend/Magento/luma/fr_FR             0/0                 >--------------------------- 0% %    0

Execution time: 19.005092859268

It's a bit sad that this new quick strategy which was launched with Magento 2.2.0 as a new feature, never worked properly, would be great if we can actually see this working sometime in the future, because I'd like to see faster SCD times if possible :)

Thanks!

TomashKhamlai commented 5 years ago

@hostep, thank you for update, we will check it.

magento-engcom-team commented 5 years ago

Hi @engcom-backlog-andrii. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

magento-engcom-team commented 5 years ago

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.

m2-assistant[bot] commented 3 years ago

Hi @engcom-Hotel. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


engcom-Hotel commented 3 years ago

Dear @hostep,

Hence the issue is reproducible with the given steps, we are reopening the issue and marking the issue confirmed. Please have a look at the below screenshot for reference: 1

Thanks

github-jira-sync-bot commented 3 years ago

:x: Something went wrong. Cannot create Jira issue.

github-jira-sync-bot commented 3 years ago

:x: Something went wrong. Cannot create Jira issue.

engcom-Alfa commented 3 years ago

@engcom-Hotel has to look at all the differences as discussed in the community triage call

engcom-Alfa commented 3 years ago

Till the completion of analysis from @engcom-Hotel on this ticket, keeping the ticket back to previous state. Thanks for your patience!

hostep commented 2 years ago

@engcom-Alfa: why exactly did you remove the "Confirmed" label again, and why did @engcom-Hotel remove their assignment?

I'm afraid that this ticket will now end up in a state that it will no longer be processed in the future ...

m2-assistant[bot] commented 2 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 2 years ago

Hi @hostep , The issue is reproducible with the given steps on Magento 2.4 Develop. Hence Marking the issue 'Issue Confirmed'.

Steps followed:

  1. Install Magento 2.2.0-rc22 or 2.2.7 or 2.3.0 or 2.4.3 or 2.4-develop using composer
  2. Add 2 language packs using composer: composer require honl/magento2-nl-nl imaginaerum/magento2-language-fr-fr
  3. Run bin/magento setup:upgrade
  4. Create 2 different storeviews in the backend and set the Locale configuration to Dutch (Netherlands) and French (France) for those 2 storeviews
  5. Reindex & flush the caches
  6. Run: rm -R var/view_preprocessed/ pub/static/ (so we start from a clean slate)
  7. Run: php bin/magento setup:static-content:deploy -s standard -f -t Magento/luma nl_NL fr_FR

Results: Screenshot from 2022-03-01 14-46-48

github-jira-sync-bot commented 2 years ago

:x: Something went wrong. Cannot create Jira issue.

hostep commented 2 years ago

Thanks, it's great to see that the majority of time spend on this issue in the last 5 years, was trying to reproduce it instead of trying to fix it.

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-2551 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

engcom-Delta commented 1 month ago

Hi @hostep ,

Thanks for your reporting and collaboration. We have re-verified the issue in latest 2.4-develop instance and the issue is reproducible. Kindly refer the screenshots.

Steps to reproduce

  1. Install Magento 2.4-develop
  2. Add 2 language packs using composer NL and Kr
  3. Run bin/magento setup:upgrade
  4. Create 2 different storeviews in the backend and set the Locale configuration to Dutch (Netherlands) and French (France) for those 2 storeviews
  5. Reindex & flush the caches
  6. Run: rm -R var/view_preprocessed/ pub/static/ (so we start from a clean slate)
  7. Run: php bin/magento setup:static-content:deploy -s standard -f -t Magento/luma ko_KR Results: image

Thanks.

hostep commented 1 month ago

@engcom-Delta: I appreciate the effort to re-test, but I think you made some mistakes. You didn't seem to have compared the standard strategy with the quick one. All the tests in your screenshot are made with the standard strategy. Also, you should test with more then a single locale, right now you only used ko_KR but you should use more than one preferably. This is because the documentation states:

Quick (default): minimizes the time required for deployment when files for more than one locale are deployed.

And that's what we are trying to verify in this issue.