kartik-v / yii2-icons

Set of icon frameworks for easy use in Yii Framework 2.0
http://demos.krajee.com/icons
Other
71 stars 29 forks source link

Bad performance #4

Closed gjportegies closed 9 years ago

gjportegies commented 9 years ago

When I implement this in my application the avarage loading time is 5 seconds for normal CRUD pages.

kartik-v commented 9 years ago

Can you explain how you have configured this extension in your app and what you are doing to replicate this?

gjportegies commented 9 years ago

I'm using the Yii2 advanced application template. I've installed the yii2-icons plugin using the composer:

composer require kartik-v/yii2-icons "dev-master".

Then I added the global configuration for font-awesome to the main.php flie of my backend.

'params' => ['icon-framework' => 'fa']

I initialized it in my layout file called admin.php:

use kartik\icons\Icon;
Icon::map($this);  

In my view file I dit the following:

use kartik\icons\Icon;

echo Html::a('label'  => Icon::show('plus') . 'new user');
kartik-v commented 9 years ago

I suppose its the loading time for font-awesome assets (CSS) on your application. The demos.krajee.com site also includes font awesome icons - but there is no significant performance impact noted due to this.

If your web server is slower -- Try these and check: