diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 09856803e78ef06ac08f13bc742114d3deddd4c3..7dd6eefc31315b404c7c3415dd0e80ef44ee1b69 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -34,6 +34,8 @@ def show
   def tree
     load_refs # load @branch, @tag & @ref
 
+
+
     @repo = project.repo
 
     if params[:commit_id]
diff --git a/app/views/projects/_tree_file.html.haml b/app/views/projects/_tree_file.html.haml
index 08927fc2aac40d5dd006f9f895db84b00e9ed387..3463bfc543f210eae553d6568dfcef3b24ebac49 100644
--- a/app/views/projects/_tree_file.html.haml
+++ b/app/views/projects/_tree_file.html.haml
@@ -3,7 +3,6 @@
   .view_file_header
     %strong
       = name
-      -#= file.mime_type
       = link_to "raw", blob_project_path(@project, :commit_id => @commit.id, :path => params[:path] ), :class => "right", :target => "_blank"
       = link_to "history", project_commits_path(@project, :path => params[:path]), :class => "right", :style => "margin-right:10px;"
       %br/
diff --git a/app/views/projects/_tree_item.html.haml b/app/views/projects/_tree_item.html.haml
index 533c1484f7e91a8c68edbbc3811a4f30ef7dce95..9ba33c1ef8833c83cc685f480ac12d1c2f1877a3 100644
--- a/app/views/projects/_tree_item.html.haml
+++ b/app/views/projects/_tree_item.html.haml
@@ -1,5 +1,5 @@
 - file = params[:path] ? File.join(params[:path], content.name) : content.name
-- content_commit = @project.repo.log(@branch, file, :max_count => 1).last
+- content_commit = @project.repo.log(@commit.id, file, :max_count => 1).last
 - return unless content_commit
 %tr{ :class => "tree-item", :url => tree_file_project_path(@project, @commit.id, file) }
   %td.tree-item-file-name
diff --git a/spec/requests/projects_tree_perfomance_spec.rb b/spec/requests/projects_tree_perfomance_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..5b4facb17d63a1fb9fac4fa04b88ba217df4fba2
--- /dev/null
+++ b/spec/requests/projects_tree_perfomance_spec.rb
@@ -0,0 +1,37 @@
+require 'spec_helper'
+require 'benchmark'
+
+describe "Projects" do
+  before { login_as :user }
+
+  describe "GET /projects/tree" do
+    describe "head" do
+      before do 
+        @project = Factory :project
+        @project.add_access(@user, :read)
+
+      end
+
+      it "should be fast" do 
+        time = Benchmark.realtime do
+          visit tree_project_path(@project)
+        end
+        (time < 1.0).should be_true
+      end
+    end
+
+    describe ValidCommit::ID do
+      before do 
+        @project = Factory :project
+        @project.add_access(@user, :read)
+      end
+
+      it "should be fast" do 
+        time = Benchmark.realtime do
+          visit tree_project_path(@project, :commit_id => ValidCommit::ID)
+        end
+        (time < 1.0).should be_true
+      end
+    end
+  end
+end