Mailinglist Archive: opensuse-ruby (21 mails)

< Previous Next >
Re: [opensuse-ruby] WebYaST: loading patches and status in the control center
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 9 Nov 2009 14:36:09 +0100
  • Message-id: <200911091436.09595.jreidinger@xxxxxxx>
Ladislav Slezak write:
Hi all,

I'd like to discuss the problem reported in bug #550934
('It takes minutes to refresh "system is up to date" and "system is
healthy"')

It takes very long time to load the initial patches and system status
information which is displayed on the first page (the WebYaST control
center) using AJAX requests.

I already have implemented caching in the patches module so the available
patches are not evaluated in every control center reload. But the first
call still takes much time...

The problem is that the first patch status request triggers repository
metadata download and cache rebuild which in case of slow/bad/overloaded
network connection can take several minutes (as reported in the bug).

A similar problem is in the status module, but not that serious - the
status is read from the local machine so network is not involved in this
case. And even on a slow machine it won't block for more than several
seconds.


I have these possible solutions for reading the patch status:

* don't display the status messages at all (IMO bad solution, I find the
overview messages quite useful...)

* make displaying of the status messages configurable (so users can hide
and disable status loading if it's too slow)

* use a background job for reading patches (display a generic message like
"Reading patches" when the request takes too long and refresh the status
after some time again to get the real status.)

AFAIK an AJAX request cannot be stopped (at least the [Stop] button in FF
is disabled when the page is loaded but an AJAX request is in progress).

I'd prefer the last solution.

Any other suggestion/solution?



Hi, I think, that third solution is good, but it is not so easy to implement,
because you must unblock webclient and also rest-service, so obtaining patch
informations doesn't block service.

I propose this solution -
webclient use ajax just to ask for data - response could be data or not yet
available. If data is not yet available do nothing. (so in response should be
ajax reneval which says ask me again after 1 second)
rest-service asynchronous fill its data structure. So until data structure is
filled it reports not yet available and when get all data, then send it.
So webclient immediately respond and also rest-service is not blocked.
Josef


Thank you in advance!


Ladislav

--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarská 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/


--
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, webyast
(language,time,basesystem,ntp)
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-ruby+help@xxxxxxxxxxxx

< Previous Next >
References