]> git.saurik.com Git - cydget.git/commitdiff
Various performance improvements thanks to the new Cycript.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 20 Nov 2009 20:00:23 +0000 (20:00 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 20 Nov 2009 20:00:23 +0000 (20:00 +0000)
PhotoExample.cydget/index.html
Welcome.html
control

index ff28b98ac9d7d71aff0ac3fb6bf9a0cd9191e8b1..2e51892acc42b4cc4f5df7b42573ff6c6660a067 100644 (file)
         document.write('</div>');
 
         dlopen("/System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary", RTLD_GLOBAL);
         document.write('</div>');
 
         dlopen("/System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary", RTLD_GLOBAL);
-        var album = PLCameraAlbum.sharedInstance.images;
+        var album = [[PLCameraAlbum sharedInstance] images];
 
         var jpeg = null, length = album.length;
         for (var i = 0; i != 5; ++i) {
 
         var jpeg = null, length = album.length;
         for (var i = 0; i != 5; ++i) {
-            jpeg = album[Math.floor(Math.random() * length)].fileGroup.pathForFullSizeImage;
+            jpeg = [[album[Math.floor(Math.random() * length)] fileGroup] pathForFullSizeImage];
             if (jpeg != null)
                 break;
         }
 
         if (jpeg == null)
             for (var i = 0; i != length; ++i) {
             if (jpeg != null)
                 break;
         }
 
         if (jpeg == null)
             for (var i = 0; i != length; ++i) {
-                jpeg = album[Math.floor(i)].fileGroup.pathForFullSizeImage;
+                jpeg = [[album[Math.floor(i)] fileGroup] pathForFullSizeImage];
                 if (jpeg != null)
                     break;
             }
                 if (jpeg != null)
                     break;
             }
index b5e7a243956b264a923d183a9a86aa5bbb666a61..4ba17343da29805346e6a390f0344d452595effb 100644 (file)
@@ -99,9 +99,7 @@
     </div>
 
     <!-- XXX: extract this out to some kind of nifty Lock Cydget library -->
     </div>
 
     <!-- XXX: extract this out to some kind of nifty Lock Cydget library -->
-    <!-- XXX: this is incredibly indirect. I mean: wth, right? well, Cycript is the slowest thing on this page -->
-    <!-- (in case anyone reading this: I believe it is entirely due to sqlite3, and I will be fixing this soon) -->
-    <script type="text/cycript">document.addEventListener("DOMContentLoaded", function() { window.setTimeout(function() {
+    <script type="text/cycript">
         var locale = CFLocaleCopyCurrent();
         var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
         var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
         var locale = CFLocaleCopyCurrent();
         var now = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent());
         var formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterNoStyle, kCFDateFormatterNoStyle);
 
         CFRelease(formatter);
         CFRelease(now);
 
         CFRelease(formatter);
         CFRelease(now);
-    }, 0)}, false);</script>
+    </script>
 </body></html>
 </body></html>
diff --git a/control b/control
index b2ccff2b345303160a7318b56a40711635494e63..8cbc2ad86e88488489853be9209c054dae454e30 100644 (file)
--- a/control
+++ b/control
@@ -3,10 +3,10 @@ Priority: optional
 Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3090-1
+Version: 0.9.3093-1
 Description: framework for managing lock screen plugins
 Name: Cydget
 Description: framework for managing lock screen plugins
 Name: Cydget
-Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib, pcre
+Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib, pcre, cycript (>= 0.9.292-1)
 Replaces: cydialer (<< 0.9.17)
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/cydget/
 Replaces: cydialer (<< 0.9.17)
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/cydget/