[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-checkins
Subject: [Gallery-checkins] [gallery/gallery3] a8bb04: Use readfile()
From: noreply () github ! com
Date: 2010-07-31 22:48:35
Message-ID: 20100731224835.25D9F4230F () smtp1 ! rs ! github ! com
[Download RAW message or body]
Branch: refs/heads/dialog
Home: http://github.com/gallery/gallery3
Commit: a8bb0462097bd83cd87bf9048b8be879cff3cd6c
http://github.com/gallery/gallery3/commit/a8bb0462097bd83cd87bf9048b8be879cff3cd6c
Author: Bharat Mediratta <bharat@menalto.com>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/controllers/file_proxy.php
Log Message:
-----------
Use readfile() instead of fopen()/fpassthru()/fclose() for brevity.
I've done some tests on a 60M flv and found that there's no difference
in memory consumption with these three approaches:
public function test() {
Kohana::close_buffers(false);
$file = "/home/bharat/basketball.flv";
if ($fd = fopen($file, "rb")) {
while (true) {
$bits = fread($fd, 65535);
if (strlen($bits) == 0) {
break;
}
print $bits;
set_time_limit(30);
}
fclose($fd);
}
Kohana_Log::add("error","test: " . \
print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); }
public function test2() {
Kohana::close_buffers(false);
$file = "/home/bharat/basketball.flv";
$fd = fopen($file, "rb");
fpassthru($fd);
fclose($fd);
Kohana_Log::add("error","test2: " . \
print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); }
public function test3() {
Kohana::close_buffers(false);
$file = "/home/bharat/basketball.flv";
readfile($file);
Kohana_Log::add("error","test3: " . \
print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); }
Commit: 68f41c7061cc6d1227286fd541d84c5df2549cb3
http://github.com/gallery/gallery3/commit/68f41c7061cc6d1227286fd541d84c5df2549cb3
Author: Bharat Mediratta <bharat@menalto.com>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/views/welcome_message.html.php
Log Message:
-----------
Fix typo: ui-corners-all --> ui-corner-all
thanks Lord Beowulf!
Commit: 5c0998c4ac9ad7572df68f5c2cc351f0d03a7bd2
http://github.com/gallery/gallery3/commit/5c0998c4ac9ad7572df68f5c2cc351f0d03a7bd2
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M lib/gallery.dialog.js
M lib/gallery.panel.js
Log Message:
-----------
Partial fix for #1225. Change the dialog and panel handling to look at the mime type \
returned to determine the content type.
Commit: bb04015149f35d7ef5ef1e98e53a1659679d83d7
http://github.com/gallery/gallery3/commit/bb04015149f35d7ef5ef1e98e53a1659679d83d7
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
A modules/gallery/helpers/json.php
Log Message:
-----------
Partial fix for #1225. Create a json reply helper that sets the content type to \
application/json and then json encodes the reply.
Commit: 89d18c0714f5c982ef9e8711a04490bdac8cae2d
http://github.com/gallery/gallery3/commit/89d18c0714f5c982ef9e8711a04490bdac8cae2d
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/user/controllers/admin_users.php
M modules/user/controllers/users.php
Log Message:
-----------
Partial fix for #1225 addresses the issues with the user edit forms.
Commit: 91a2c04a24c320df37ea980f11245eb4e086879e
http://github.com/gallery/gallery3/commit/91a2c04a24c320df37ea980f11245eb4e086879e
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/comment/controllers/admin_manage_comments.php
M modules/comment/controllers/comments.php
M modules/exif/controllers/exif.php
M modules/gallery/controllers/admin.php
M modules/gallery/controllers/admin_advanced_settings.php
M modules/gallery/controllers/admin_languages.php
M modules/gallery/controllers/admin_maintenance.php
M modules/gallery/controllers/admin_modules.php
M modules/gallery/controllers/admin_sidebar.php
M modules/gallery/controllers/albums.php
M modules/gallery/controllers/l10n_client.php
M modules/gallery/controllers/login.php
M modules/gallery/controllers/move.php
M modules/gallery/controllers/movies.php
M modules/gallery/controllers/permissions.php
M modules/gallery/controllers/photos.php
M modules/gallery/controllers/quick.php
M modules/gallery/controllers/reauthenticate.php
M modules/gallery/controllers/uploader.php
M modules/gallery/controllers/user_profile.php
M modules/organize/controllers/organize.php
M modules/rest/helpers/rest.php
M modules/server_add/controllers/server_add.php
M modules/tag/controllers/admin_tags.php
M modules/tag/controllers/tags.php
M modules/user/controllers/password.php
M modules/watermark/controllers/admin_watermarks.php
Log Message:
-----------
More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
Commit: 09dfe1a91b3e663917fe53516148fe5d74c099fa
http://github.com/gallery/gallery3/commit/09dfe1a91b3e663917fe53516148fe5d74c099fa
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/controllers/admin_themes.php
Log Message:
-----------
Convert the admin_theme controller to use the json::reply method
Commit: 0cca2fdf9bc0e77e1015975efdb9fe7c07a75b5f
http://github.com/gallery/gallery3/commit/0cca2fdf9bc0e77e1015975efdb9fe7c07a75b5f
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M lib/gallery.dialog.js
Log Message:
-----------
Correct the name of the JSON member that contains the form data.
Commit: 29f29d2261c96c30eb3e63a8066e80ade5497081
http://github.com/gallery/gallery3/commit/29f29d2261c96c30eb3e63a8066e80ade5497081
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/controllers/admin.php
M modules/gallery/controllers/reauthenticate.php
Log Message:
-----------
When the admin controller redirects to the reauthenticate controller, the value of \
request::is_ajax() from the original request is lost. This patch stores its value in \
the session so the reauthenticate controller knows whether its in a dialog/panel or \
not.
Commit: 0c535c85ed7eb5d852ff18715287dd63f85903ac
http://github.com/gallery/gallery3/commit/0c535c85ed7eb5d852ff18715287dd63f85903ac
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/controllers/reauthenticate.php
Log Message:
-----------
Missing the user name on the reauthenticate form.
Commit: a6ceb927e602dd693b011a17e625cc9c87d57d69
http://github.com/gallery/gallery3/commit/a6ceb927e602dd693b011a17e625cc9c87d57d69
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M lib/gallery.dialog.js
M lib/gallery.panel.js
Log Message:
-----------
Sometimes in dialogs, the form is wrapped in a view to provide additional \
information. We need to replace the contents of the entire dialog, not just the \
form, otherwise, there could be text floating around that doesn't make sense.
Commit: a6280641f53391dd57b3760ac882c3219e0cee6e
http://github.com/gallery/gallery3/commit/a6280641f53391dd57b3760ac882c3219e0cee6e
Author: Tim Almdal <tnalmdal@shaw.ca>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Changed paths:
M modules/gallery/controllers/login.php
M modules/gallery/controllers/reauthenticate.php
Log Message:
-----------
Resend the entire dialog content (including the wrapping view) instead of just the \
form.
Commit: e354469285b7a9569efa1b2385259d6f27fe2b63
http://github.com/gallery/gallery3/commit/e354469285b7a9569efa1b2385259d6f27fe2b63
Author: Bharat Mediratta <bharat@menalto.com>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Log Message:
-----------
Merge branch 'dialog' of github.com:gallery/gallery3 into dialog
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
__[ g a l l e r y - c h e c k i n s ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic