After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 159083 - Progress window needed for large crypt operations
Progress window needed for large crypt operations
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
0.7.x
Other All
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks: 157818
 
 
Reported: 2004-11-22 17:36 UTC by Robert Walker
Modified: 2006-04-24 20:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of bug 159083 (4.12 KB, image/png)
2004-11-22 17:38 UTC, Robert Walker
  Details
progressbar patch for key generation (12.05 KB, patch)
2006-04-09 05:28 UTC, Jim Pharis
committed Details | Review

Description Robert Walker 2004-11-22 17:36:59 UTC
Please describe the problem:
When creating a large encyrpted archive Seahorse hangs and you get a weird
whacked window. It still seems to do what it needs to do as it will create the
encrypted archive but I have had to do a "force quit" to exit the program.The
achive that I am refering to here is 50megs. Smaller one like 7 - 10 seem to
work fine. I am not sure what the threshhold is. Same thing happens with .zip
and .tar.gz

Steps to reproduce:
1. Right Click of a folder
2. Select "encrypt"..
3. Choose how you want to compress the folder and once it is done compressing
once you select the key to encrypt to it hangs and you get the blank screen see
attachment.


Actual results:
Program hangs.. it will encrypt and eventually the "hanging window" will
disappear. While it is "hanging" there is a significant over system slowdown if
you are trying to do other things.

Expected results:
Encrypt the folder and have a "clean exit" from Seahorse.

Does this happen every time?
yes

Other information:
No
Comment 1 Robert Walker 2004-11-22 17:38:47 UTC
Created attachment 34034 [details]
screenshot of bug 159083
Comment 2 Stef Walter 2004-11-22 17:51:04 UTC
We need to work on progress windows showing up for all operations that take more
time than a given threshold. 

Ideally the progress window should remain hidden for the first few seconds, and
then show up after a few seconds. 
Comment 3 Adam Schreiber 2004-11-30 00:51:17 UTC
How large is the file you're noticing this on?
Comment 4 Robert Walker 2004-11-30 04:55:35 UTC
500 Megs. On smaller files like around 50 megs there isn't the same problem..
Comment 5 Stef Walter 2004-12-03 01:04:14 UTC
Noticed that the file operations could be a lot less resource intensive.
Seahorse was first performing the entire operation in memory, and then writing
it out to a file. Changed so it writes out as data is available. This should
help alleviate this problem for now. 
Comment 6 Adam Schreiber 2004-12-09 16:47:28 UTC
Nate,

Are there any good examples that you know of on implementing progress windows,
and knowing which operations require them?

Adam
Comment 7 Stef Walter 2004-12-09 20:56:38 UTC
This is a good section of the HIG to read:

http://developer.gnome.org/projects/gup/hig/2.0/feedback.html

I've been doing a lot of work on this recently, but would welcome help. Much of
the work so far has been base class and infrastructure work to support async
operations everwhere. 

I've added the SeahorseOperation base class a while back to this end. It should
be a base class for all operations that could possibly take longer that roughly
1 second. 

Over the last few days, I've added progress (percentage, status message etc...)
support to SeahorseOperation, and will check this in shortly.

One other thing I've been working on slowly is making all user operations
parellizable. Like for example importing a key from a remote key server can be
started, and then the user can for example export other keys while that's
happening etc...

Naturally the file operations called from nautilus don't really have to have
this requirement, but it would be good if everything was coded this way, so we
have reentrant code.

IMO, progress windows should base themselves off of SeahorseOperation which
fires signals when progress is changed etc... They should only display after
over 1 second of time has elapsed and the operation is still not complete.

What we want to prevent is flashing the user with progress windows which they
can't even read, because the operation is done too fast.
Comment 8 Stef Walter 2004-12-15 02:56:56 UTC
I committed a bunch of code that adds progress support to SeahorseOperation. The
progress bars on the main windows now watch this. Remaining:

- Flesh out the current operations to provide notifications and progress. The
  capability is there, we just need to hook in the various messages at the 
  appropriate points.
- Add more operations for the crypt operations. These would be wrappers around 
  the gpgme_set_progress_cb and gpgme_wait etc...
- Add common code for a progress window that listens on SeahorseOperation. We'd 
  use this for operations that aren't bound to a main window (and thus can't use
  it's progress bar)


Comment 9 Stef Walter 2005-04-06 01:12:04 UTC
Status Update: We have progress dialog code committed. Next we need it to
serialize the large crypto operations into SeahorseOperation's. 
Comment 10 Adam Schreiber 2005-05-29 13:00:02 UTC
If there's a completed example, and a list of functions to serialize, I could
work on this.
Comment 11 Stef Walter 2005-06-01 17:03:43 UTC
A SeahorseOperation basically works asynchronously so that makes this a bit
complex. In the case of files the fact that they can all be different sizes
(etc...) makes this even more interesting. The only examples in the CVS are in
the various SeahorseKeySource's (like SeahorsePGPSource, SeahorseLDAPSource etc...).


Comment 12 Stef Walter 2006-03-21 03:53:55 UTC
I've added SeahorsePGPOperation which will do the heavy lifting here. Should be pretty easy to implement the progress dialogs now.

Documentation for using SeahorsePGPOperation is in the seahorse-pgp-operation.h header.
Comment 13 Jim Pharis 2006-04-09 05:28:58 UTC
Created attachment 63004 [details] [review]
progressbar patch for key generation

This patch displays a progress bar when creating keys with either the druid or in advanced mode. It uses the SeahorsePGPOperation that Nate implemented.
Comment 14 Stef Walter 2006-04-09 19:38:55 UTC
Nice. I committed it with a few small changes. I figured I'd note them here in case it's a help:

seahorse_pgp_key_op_generate()
 * returns a SeahorseOperation instead of SeahorsePGPOperation
 * initialize |pop| properly 
 * free expires_date properly
 * initialized *err 
ok_clicked() / on_druid_finish()
 * Made progress text translatable
included seahorse-progress.h in seahorse-generate-druid.c

Comment 15 Stef Walter 2006-04-24 20:55:24 UTC
Finally committed progress windows for file operations today. A new 'seahorse-tool' binary, which does the actual encryption and decryption. However this should be transparent to users.