Permalink
Browse files

made the use iframe an option for appcelerator to compare the differe…

…nt results
  • Loading branch information...
bahzuercher
bahzuercher committed Mar 12, 2009
1 parent d8e3859 commit 5dd2619cf7504c602df49a051b36a025caa404be
@@ -1,5 +1,4 @@
class VotesController < ApplicationController
-
def list
puts "you called list"
items = 40
@@ -1,6 +1,6 @@
class VoteService < Appcelerator::Service
- Service 'get.votes2.request', :get_votes, 'get.votes2.response'
- def get_votes2
+ Service 'get.votes.request', :get_votes, 'get.votes.response'
+ def get_votes
items = 40
if !(params['items'].nil?)
items = params['items'].to_i
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org/">
+ <head>
+ <title>Test Appcelerator</title>
+
+ <style type="text/css">
+ th {text-align: left; width: 171;}
+ tr {border-bottom: 1px solid #333;}
+ .style43 {color: red}
+ </style>
+
+ <script type="text/javascript">
+ APP_TIMERS = {};
+ APP_TIMERS.START_TIMER = new Date();
+ </script>
+ <script type="text/javascript" src="javascripts/entourage-debug.js"></script>
+ <script type="text/javascript" src="javascripts/application.js"></script>
+ <script type="text/javascript">
+ APP_TIMERS.FRAMEWORK_LOADED = new Date();
+
+ APP_TIMERS.finish_test = function() {
+ document.getElementById('framework_load_time').innerHTML = (APP_TIMERS.FRAMEWORK_LOADED - APP_TIMERS.START_TIMER);
+ document.getElementById('dom_load_time').innerHTML = (APP_TIMERS.DOM_LOADED - APP_TIMERS.FRAMEWORK_LOADED);
+ document.getElementById('mixed_render').innerHTML = (APP_TIMERS.MIXED_RENDER - APP_TIMERS.DOM_LOADED);
+ document.getElementById('large_file_load').innerHTML = (APP_TIMERS.BIG_FILE_LOADED - APP_TIMERS.MIXED_RENDER);
+ document.getElementById('dynamic_file_load').innerHTML = (APP_TIMERS.BIG_DYNAMIC_FILE_LOADED - APP_TIMERS.BIG_FILE_LOADED);
+ document.getElementById('crazy_large_file_load').innerHTML = (APP_TIMERS.CRAZY_LARGE_FILE_LOADED - APP_TIMERS.BIG_DYNAMIC_FILE_LOADED);
+ document.getElementById('total_time').innerHTML = (new Date() - APP_TIMERS.START_TIMER);
+ }
+ </script>
+
+ </head>
+ <body style="background-color: rgb(255,250,232)">
+ <h3>Appcelerator 2.3</h3>
+ <table>
+ <tr>
+ <th>Framework Loaded in</th><td id="framework_load_time"></td>
+ </tr><tr>
+ <th>DOM Loaded in</th><td id="dom_load_time"></td>
+ </tr><tr>
+ <th>Mixed Render</th><td id="mixed_render"></td>
+ </tr><tr>
+ </tr><tr>
+ <th>Load Large File</th><td id="large_file_load"></td>
+ </tr><tr>
+ <th>Dynamic Large File</th><td id="dynamic_file_load"></td>
+ </tr><tr>
+ <th>Crazy-Large File</th><td id="crazy_large_file_load"></td>
+ </tr><tr>
+ <th>Total</th><td id="total_time"></td>
+ </tr>
+ </table>
+
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <div control="content[onload=l:votes.loaded,lazy=true,useframe=true,src=/appcelerator-2.3/content/votes.html]" on="l:app.compiled then execute"></div>
+ </div>
+ <div style="display:none">
+ <div control="content[onload=l:big.file.loaded,lazy=true,useframe=true,src=/home/presidential]" on="l:load.big.file then execute"></div>
+ </div>
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <div control="content[onload=l:dynamic.big.file.loaded,lazy=true,useframe=true,src=/home/senate_appcelerator]" on="l:load.dynamic.big.file then execute"></div>
+ </div>
+ <div style="display: none">
+ <div control="content[onload=l:crazy.big.file.loaded,lazy=true,useframe=true,src=/home/big_table]" on="l:load.crazy.big.file then execute"></div>
+ </div>
+ </body>
+</html>
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org/">
+ <head>
+ <title>Test Appcelerator</title>
+
+ <style type="text/css">
+ th {text-align: left; width: 171;}
+ tr {border-bottom: 1px solid #333;}
+ .style43 {color: red}
+ </style>
+
+ <script type="text/javascript">
+ APP_TIMERS = {};
+ APP_TIMERS.START_TIMER = new Date();
+ </script>
+ <script type="text/javascript" src="javascripts/entourage.js"></script>
+ <script type="text/javascript" src="javascripts/application.js"></script>
+ <script type="text/javascript">
+ APP_TIMERS.FRAMEWORK_LOADED = new Date();
+
+ APP_TIMERS.finish_test = function() {
+ document.getElementById('framework_load_time').innerHTML = (APP_TIMERS.FRAMEWORK_LOADED - APP_TIMERS.START_TIMER);
+ document.getElementById('dom_load_time').innerHTML = (APP_TIMERS.DOM_LOADED - APP_TIMERS.FRAMEWORK_LOADED);
+ document.getElementById('mixed_render').innerHTML = (APP_TIMERS.MIXED_RENDER - APP_TIMERS.DOM_LOADED);
+ document.getElementById('large_file_load').innerHTML = (APP_TIMERS.BIG_FILE_LOADED - APP_TIMERS.MIXED_RENDER);
+ document.getElementById('dynamic_file_load').innerHTML = (APP_TIMERS.BIG_DYNAMIC_FILE_LOADED - APP_TIMERS.BIG_FILE_LOADED);
+ document.getElementById('crazy_large_file_load').innerHTML = (APP_TIMERS.CRAZY_LARGE_FILE_LOADED - APP_TIMERS.BIG_DYNAMIC_FILE_LOADED);
+ document.getElementById('total_time').innerHTML = (new Date() - APP_TIMERS.START_TIMER);
+ }
+ </script>
+
+ </head>
+ <body style="background-color: rgb(255,250,232)">
+ <h3>Appcelerator 2.3</h3>
+ <table>
+ <tr>
+ <th>Framework Loaded in</th><td id="framework_load_time"></td>
+ </tr><tr>
+ <th>DOM Loaded in</th><td id="dom_load_time"></td>
+ </tr><tr>
+ <th>Mixed Render</th><td id="mixed_render"></td>
+ </tr><tr>
+ </tr><tr>
+ <th>Load Large File</th><td id="large_file_load"></td>
+ </tr><tr>
+ <th>Dynamic Large File</th><td id="dynamic_file_load"></td>
+ </tr><tr>
+ <th>Crazy-Large File</th><td id="crazy_large_file_load"></td>
+ </tr><tr>
+ <th>Total</th><td id="total_time"></td>
+ </tr>
+ </table>
+
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <div control="content[onload=l:votes.loaded,lazy=true,useframe=true,src=/appcelerator-2.3/content/votes.html]" on="l:app.compiled then execute"></div>
+ </div>
+ <div style="display:none">
+ <div control="content[onload=l:big.file.loaded,lazy=true,useframe=true,src=/home/presidential]" on="l:load.big.file then execute"></div>
+ </div>
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <div control="content[onload=l:dynamic.big.file.loaded,lazy=true,useframe=true,src=/home/senate_appcelerator]" on="l:load.dynamic.big.file then execute"></div>
+ </div>
+ <div style="display: none">
+ <div control="content[onload=l:crazy.big.file.loaded,lazy=true,useframe=true,src=/home/big_table]" on="l:load.crazy.big.file then execute"></div>
+ </div>
+ </body>
+</html>
@@ -1,5 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org/">
<head>
<title>Test Appcelerator</title>
@@ -24,7 +23,7 @@
document.getElementById('mixed_render').innerHTML = (APP_TIMERS.MIXED_RENDER - APP_TIMERS.DOM_LOADED);
document.getElementById('large_file_load').innerHTML = (APP_TIMERS.BIG_FILE_LOADED - APP_TIMERS.MIXED_RENDER);
document.getElementById('dynamic_file_load').innerHTML = (APP_TIMERS.BIG_DYNAMIC_FILE_LOADED - APP_TIMERS.BIG_FILE_LOADED);
- // document.getElementById('crazy_large_file_load').innerHTML = (APP_TIMERS.CRAZY_LARGE_FILE_LOADED - APP_TIMERS.BIG_DYNAMIC_FILE_LOADED);
+ document.getElementById('crazy_large_file_load').innerHTML = (APP_TIMERS.CRAZY_LARGE_FILE_LOADED - APP_TIMERS.BIG_DYNAMIC_FILE_LOADED);
document.getElementById('total_time').innerHTML = (new Date() - APP_TIMERS.START_TIMER);
}
</script>
@@ -44,8 +43,8 @@ <h3>Appcelerator ptek</h3>
<th>Load Large File</th><td id="large_file_load"></td>
</tr><tr>
<th>Dynamic Large File</th><td id="dynamic_file_load"></td>
- <!-- </tr><tr>
- <th>Crazy-Large File</th><td id="crazy_large_file_load"></td> -->
+ </tr><tr>
+ <th>Crazy-Large File</th><td id="crazy_large_file_load"></td>
</tr><tr>
<th>Total</th><td id="total_time"></td>
</tr>
@@ -62,33 +61,33 @@ <h3>Appcelerator ptek</h3>
$MQ('l:load.big.file', {});
</app:script>
<div style="display:none">
- <app:content lazy="true" on="l:load.big.file then execute" src='/home/presidential' onload="l:big.file.loaded"></app:content>
+ <app:content lazy="true" useframe="false" on="l:load.big.file then execute" src='/home/presidential' onload="l:big.file.loaded"></app:content>
</div>
<app:script on="l:big.file.loaded then execute">
APP_TIMERS.BIG_FILE_LOADED = new Date();
$MQ('l:load.dynamic.big.file', {});
</app:script>
<div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
- <app:content lazy="true" on="l:load.dynamic.big.file then execute" src='/home/senate_appcelerator' onload="l:dynamic.big.file.loaded"></app:content>
+ <app:content lazy="true" useframe="false" on="l:load.dynamic.big.file then execute" src='/home/senate_appcelerator' onload="l:dynamic.big.file.loaded"></app:content>
</div>
<app:script on="l:dynamic.big.file.loaded then execute">
APP_TIMERS.BIG_DYNAMIC_FILE_LOADED = new Date();
- $MQ('l:load.crazy.big.file', {});
- APP_TIMERS.finish_test();
+ if (''+ Appcelerator.Parameters.get('test_crazylargefile')=='true') {
+ $MQ('l:load.crazy.big.file', {});
+ } else {
+ APP_TIMERS.CRAZY_LARGE_FILE_LOADED = APP_TIMERS.BIG_DYNAMIC_FILE_LOADED;
+ APP_TIMERS.finish_test();
+ }
</app:script>
- <!-- <div style="display: none">
- <app:content lazy="true" on="l:load.crazy.big.file then execute" src='/home/big_table' onload="l:crazy.big.file.loaded"></app:content>
+ <div style="display: none">
+ <app:content lazy="true" useframe="false" on="l:load.crazy.big.file then execute" src='/home/big_table' onload="l:crazy.big.file.loaded"></app:content>
</div>
<app:script on="l:crazy.big.file.loaded then execute">
APP_TIMERS.CRAZY_LARGE_FILE_LOADED = new Date();
APP_TIMERS.finish_test();
- </app:script> -->
-
- <div style="display: none">
- <%= render :partial => 'junk_elements' %>
- </div>
+ </app:script>
</body>
</html>
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:app="http://www.appcelerator.org/">
+ <head>
+ <title>Test Appcelerator</title>
+
+ <style type="text/css">
+ th {text-align: left; width: 171;}
+ tr {border-bottom: 1px solid #333;}
+ .style43 {color: red}
+ </style>
+
+ <script type="text/javascript">
+ APP_TIMERS = {};
+ APP_TIMERS.START_TIMER = new Date();
+ </script>
+ <script type="text/javascript" src="javascripts/appcelerator-debug.js"></script>
+ <script type="text/javascript">
+ APP_TIMERS.FRAMEWORK_LOADED = new Date();
+
+ APP_TIMERS.finish_test = function() {
+ document.getElementById('framework_load_time').innerHTML = (APP_TIMERS.FRAMEWORK_LOADED - APP_TIMERS.START_TIMER);
+ document.getElementById('dom_load_time').innerHTML = (APP_TIMERS.DOM_LOADED - APP_TIMERS.FRAMEWORK_LOADED);
+ document.getElementById('mixed_render').innerHTML = (APP_TIMERS.MIXED_RENDER - APP_TIMERS.DOM_LOADED);
+ document.getElementById('large_file_load').innerHTML = (APP_TIMERS.BIG_FILE_LOADED - APP_TIMERS.MIXED_RENDER);
+ document.getElementById('dynamic_file_load').innerHTML = (APP_TIMERS.BIG_DYNAMIC_FILE_LOADED - APP_TIMERS.BIG_FILE_LOADED);
+ document.getElementById('crazy_large_file_load').innerHTML = (APP_TIMERS.CRAZY_LARGE_FILE_LOADED - APP_TIMERS.BIG_DYNAMIC_FILE_LOADED);
+ document.getElementById('total_time').innerHTML = (new Date() - APP_TIMERS.START_TIMER);
+ }
+ </script>
+
+ </head>
+ <body style="background-color: rgb(255,250,232)">
+ <h3>Appcelerator ptek</h3>
+ <table>
+ <tr>
+ <th>Framework Loaded in</th><td id="framework_load_time"></td>
+ </tr><tr>
+ <th>DOM Loaded in</th><td id="dom_load_time"></td>
+ </tr><tr>
+ <th>Mixed Render</th><td id="mixed_render"></td>
+ </tr><tr>
+ </tr><tr>
+ <th>Load Large File</th><td id="large_file_load"></td>
+ </tr><tr>
+ <th>Dynamic Large File</th><td id="dynamic_file_load"></td>
+ </tr><tr>
+ <th>Crazy-Large File</th><td id="crazy_large_file_load"></td>
+ </tr><tr>
+ <th>Total</th><td id="total_time"></td>
+ </tr>
+ </table>
+
+ <app:script on='l:app.compiled then execute'>
+ APP_TIMERS.DOM_LOADED = new Date();
+ </app:script>
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <app:content lazy="true" useframe="true" on="l:app.compiled then execute" src='content/votes.html' onload="l:votes.loaded"></app:content>
+ </div>
+ <app:script on="l:mixed.loaded then execute">
+ APP_TIMERS.MIXED_RENDER = new Date();
+ $MQ('l:load.big.file', {});
+ </app:script>
+ <div style="display:none">
+ <app:content lazy="true" useframe="true" on="l:load.big.file then execute" src='/home/presidential' onload="l:big.file.loaded"></app:content>
+ </div>
+
+ <app:script on="l:big.file.loaded then execute">
+ APP_TIMERS.BIG_FILE_LOADED = new Date();
+ $MQ('l:load.dynamic.big.file', {});
+ </app:script>
+ <div style="width: 100%; height: 180px; background-color: rgb(204, 203, 165); overflow-y: scroll">
+ <app:content lazy="true" useframe="true" on="l:load.dynamic.big.file then execute" src='/home/senate_appcelerator' onload="l:dynamic.big.file.loaded"></app:content>
+ </div>
+ <app:script on="l:dynamic.big.file.loaded then execute">
+ APP_TIMERS.BIG_DYNAMIC_FILE_LOADED = new Date();
+ if (''+ Appcelerator.Parameters.get('test_crazylargefile')=='true') {
+ $MQ('l:load.crazy.big.file', {});
+ } else {
+ APP_TIMERS.CRAZY_LARGE_FILE_LOADED = APP_TIMERS.BIG_DYNAMIC_FILE_LOADED;
+ APP_TIMERS.finish_test();
+ }
+ </app:script>
+
+ <div style="display: none">
+ <app:content lazy="true" useframe="true" on="l:load.crazy.big.file then execute" src='/home/big_table' onload="l:crazy.big.file.loaded"></app:content>
+ </div>
+
+ <app:script on="l:crazy.big.file.loaded then execute">
+ APP_TIMERS.CRAZY_LARGE_FILE_LOADED = new Date();
+ APP_TIMERS.finish_test();
+ </app:script>
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 5dd2619

Please sign in to comment.