[opensuse-buildservice] frontend does too much when uploading a file
Hi, during a file upload the frontend performs superfluous (IMHO) tasks like sending the package metadata (which doesn't change during the upload) to the backend etc. The problematic method is "update_timestamp" in the Package() class (see models/package.rb). Instead of simply updating some timestamp tables it regenerates the complete metadata. I attached a small patch which _only_ updates the timestamp without touching any metadata. Btw. with this patch we gain a small perfomance boost: - executing the old version takes around 2.81 seconds - executing the new version takes around 1 second (measured with ruby's 'profiler' module) Marcus Ps. I don't know if this is a good "ruby style" but it works for me:)
On 2008-05-30 15:11:31 +0200, Marcus Hüwe wrote:
during a file upload the frontend performs superfluous (IMHO) tasks like sending the package metadata (which doesn't change during the upload) to the backend etc. The problematic method is "update_timestamp" in the Package() class (see models/package.rb). Instead of simply updating some timestamp tables it regenerates the complete metadata. I attached a small patch which _only_ updates the timestamp without touching any metadata. Btw. with this patch we gain a small perfomance boost: - executing the old version takes around 2.81 seconds - executing the new version takes around 1 second (measured with ruby's 'profiler' module)
does your version update the timestamp in the backend aswell? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-30 16:01:34 +0200, Marcus Rueckert wrote:
On 2008-05-30 15:11:31 +0200, Marcus Hüwe wrote:
during a file upload the frontend performs superfluous (IMHO) tasks like sending the package metadata (which doesn't change during the upload) to the backend etc. The problematic method is "update_timestamp" in the Package() class (see models/package.rb). Instead of simply updating some timestamp tables it regenerates the complete metadata. I attached a small patch which _only_ updates the timestamp without touching any metadata. Btw. with this patch we gain a small perfomance boost: - executing the old version takes around 2.81 seconds - executing the new version takes around 1 second (measured with ruby's 'profiler' module)
does your version update the timestamp in the backend aswell?
Well the backend adds a new event to the "events/lastevents" file which also contains the timestamp. Without this patch there were 2 events (one for the file upload and one for the meta change). So it'll still work with this patch (if I'm not totally mistaken). Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Marcus Hüwe
-
Marcus Rueckert