Mailinglist Archive: opensuse-buildservice (234 mails)

< Previous Next >
Re: [opensuse-buildservice] frontend does too much when uploading a file
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Fri, 30 May 2008 17:05:52 +0200
  • Message-id: <20080530150552.GB3692@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >