ilya78

Experience

360

0 Best Reply Awards

  • Member Since 5 Months Ago
  • 1 Lesson Completed
  • 1 Favorite

2nd November, 2017

ilya78 started a new conversation Pjax And Script Loading • 3 weeks ago

Hello. I have Laravel 5.5 with pjax on the pages there are blocks

@push('scripts')
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.0.4/howler.min.js"></script>
.....
@endpush

and if i load page with pjax these scripts are not loaded

14th September, 2017

ilya78 left a reply on How To Speed Up Laravel? • 2 months ago

Thank you for your answer.

We also use cloudflare (with PRO plan).

All images are compressed maximally and pictures 200px weigh about 10-15kb (for example size of this img (http://prntscr.com/gl77mw) = 16 kb)

Yes, we use http cache headers.

About assets. Here we have a problem. CSS size = ~400kb And we have about 7 js scripts, but we load them using cdn servers.

We load img, js, css from subdomain.

ilya78 started a new conversation How To Speed Up Laravel? • 2 months ago

Hello. My server work on Apache + OPcache + PHP 7 + laravel (with memcached) How to improve performance? On slow connection site loaded very long (10-12 seconds), on normal connection site loaded in 2-3 seconds. I changed half of the requests for ajax

3rd July, 2017

ilya78 started a new conversation How To Speed Up Load Page • 4 months ago

Hello. I have this code. In controller:

$users= User::where('invite', $us->ref_code)->get();

$params['all_sum'] = 0;
foreach($users as $user){
    $payments = $user->unitpay->where('status', 1)->sum('sum');
    $payments2 = $user->g2a->where('status', 'complete')->sum('amount');
    $deposits = $user->trades->where('status', 'success')->sum('sum');
    $all = $payments + $payments2 + $deposits;
                
    $params['all_sum'] += round($all, 2);
}

In model:

public function unitpay() {
    return $this->hasMany('App\Models\Unitpay', 'account', 'steam_id');
}
    
public function g2a() {
    return $this->hasMany('App\Models\G2A', 'steam_id');
}

public function trades() {
    return $this->hasMany('App\Models\TradeLog', 'user_id', 'steam_id');
}

The page loads in 15 seconds. I know what I need to use eloquent-relationships in models, but I don't know how to do it. Please, Help me

6th June, 2017

ilya78 left a reply on How To Speed Up Laravel Routing? • 5 months ago

Thanks for your answer.

I use Apache + OPcache. Laravel 5.4 PHP 7.0

May be i can use Pjax? But i don't know how) I'm trying, but the page has not loaded correctly. JS on the load page did not work and controllers on page did not work.

And I noticed something strange.

If i click for example on link "/partner" - site started a redirects ("/" -> "/partner" -> "/" -> "/partner")

P.S. : Sorry for my English

5th June, 2017

ilya78 left a reply on How To Speed Up Laravel Routing? • 5 months ago

Yes, i tried this.

I have error on cache routes: Unable to prepare route [partner/{code}] for serialization. Uses Closure.

ilya78 left a reply on How To Speed Up Laravel Routing? • 5 months ago

But I have high speed Internet, but if people will go with the speed of 1mb/s. I think he will have to wait more than 1 second

ilya78 left a reply on How To Speed Up Laravel Routing? • 5 months ago

I sped up the download using memcached, Even had to clean up the database (For example, there were 700000 entries, was reduced to 70000. But after a couple days of entries again will be 700000). Left a couple of pages that cannot be cached. They load the relevant information about the invited partners. And every minute the data can be changed, and the request takes about min 5 seconds. My target is to achieve at least 100ms. Now other pages loaded for 200-400ms. Laravel boot up for ~70ms

4th June, 2017

ilya78 left a reply on How To Speed Up Laravel Routing? • 5 months ago

But almost all of my content is dynamic. I need near-instant page navigation

ilya78 started a new conversation How To Speed Up Laravel Routing? • 5 months ago

Hello. I need help) How to speed up laravel routing without vue (I do not have time to transfer the whole project into vue). May be i can use pjax? But what about internal functions and ajax on these pages?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.