Shrink Yii, help your IDE and speed up copying

You are viewing revision #2 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version.

next (#3) »

  1. Introduction
  2. Lets begin


In this little tip, I will help you to cut Yii size for about half

yii-1.1.8.r3324 framework directory is 10.4 mb size.

Lets see what you can achieve buy deleting some things we "don't need"

This will make the framework more portable, and will make the development process more fun by speeding the copy procedure etc.

Lets begin

First of all, I must say Yii framework not so bloated as Zend Framework for example, where there is really a lot of things you will never use, like barcode etc. In Yii, You need most of the stuff...

So lets go directory by directory, end delete some stuff!


There you have some caching classes, feel free to delete what you don't use I deleted CEAcceleratorCache.php, CWinCache.php 8kb saved... but it's not the end ;-)


3.71mb of data that you will never use!

just find the english, and some languages you use and delete all the other stuff...

I deleted all except of en,ru,he

250kb left, 3.46mb deleted


1.15mb of stuff you will never use

just pick the langueages you use, and delete the others

deleted all except en,ru

80kb left, 1.07mb saved


This is a good idea to test your code... But I'm sure most of you don't do it... so fill free to delete it

-20kb ;-)


300kb of views you don't need...

just choose your language... chose ru,en...

40kb left 260kb saved

up to now by directories comparison I shrinked the library from 10.4mb to 5.59mb

In .rar form it is 3.204mb vs 1.54mb

Another benefit from it is that if you use some IDE, sometimes it can drive you crazy as it indexing sometimes so slow... So the less files you have... the faster indexing and projects refresh you have... So this is another nice benefit...

Fill free to shrink it even more ;-)

9 8
Viewed: 12 662 times
Version: Unknown (update)
Category: Tips
Written by: dckurushin
Last updated by: dckurushin
Created on: Sep 21, 2011
Last updated: 10 years ago
Update Article


View all history

Related Articles