Skip to content
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

Feat flush view data #451

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Feat flush view data #451

wants to merge 2 commits into from

Commits on Feb 25, 2022

  1. Feat flush view data

    The view data keeps appending causing memory to increase.
    
    For example.
    
    There is a timed task to send emails, I send 100 emails with different data, the view data length will be 100, the data volume is large but the memory is relatively small, it can easily lead to killed.
    
    ```php
            for ($index = 0; $index < 100; $index++) {
                /* @var Factory $viewFactor */
                $viewFactor = Mail::getViewFactory();
    
                $view = $viewFactor->make('email.view', [
                    // ......
                ]);
    
                // get html
                $data = $view->render();
    
                /* @var CompilerEngine $viewEngine */
                $viewEngine = $view->getEngine();
                $viewEngine->flushViewData();
    
                // send mail via raw data
                // ......
            }
    ```
    viest committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    756f0d6 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2022

  1. Configuration menu
    Copy the full SHA
    1690412 View commit details
    Browse the repository at this point in the history