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 349044 - Preferences are not saved when edited?
Preferences are not saved when edited?
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal normal
: ---
Assigned To: Charles Kerr
Pan QA Team
: 349188 349731 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-28 07:05 UTC by Glyn Parker
Modified: 2006-09-18 23:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0.112 patch (2.78 KB, patch)
2006-09-16 22:34 UTC, Charles Kerr
none Details | Review

Description Glyn Parker 2006-07-28 07:05:20 UTC
Please describe the problem:
Preferences do not seem to be saved upon edit.

After configuring Pan, setting servers, group list download, collecting news headers, articles and such, a crash causes a loss of config.

When Pan reloads it has no subscribed groups (although the articles are stored).  It may also have other config missing (not saved before crash).



Steps to reproduce:
1. Clean Pan config.
2. Setup pan and do some normal things, cause a crash :)
3. Reload pan and see that the config is missing.



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Glyn Parker 2006-07-28 07:08:23 UTC
Oh my english....

Point 2 above should read, "Setup pan and do some normal things.  The problem is only visible if you cause a crash".

/G
Comment 2 Charles Kerr 2006-07-28 17:12:56 UTC
Writing the newsrc files is one of the more unavoidably slow
parts of Pan, so I'd prefer to /not/ have to write it out
very frequently.

Did you file a bug report on the crash?
Comment 3 Charles Kerr 2006-07-29 16:30:00 UTC
*** Bug 349188 has been marked as a duplicate of this bug. ***
Comment 4 Duncan 2006-07-29 17:44:38 UTC
> Has Pan been crashing on you, Duncan?

Not pan, but sometimes xorg, which of course takes pan with it.  A bit OT but...  I love the translucency effects of composite, but with XAA rendering they are slow and/or take up huge amounts of CPU, and while EXA rendering is FAR faster (very little composite overhead), it's still labeled "unstable" for a reason!  KDE's compositing helper kompmgr causes X to leak memory (restarting it returns the resources most of the time, even tho they were on X's tab).  I have that controlled due to having 8 gig to work with and reasonably tight ulimit virtual and resident memory limits, but when it runs out of memory it tries to eat 100% CPU.  Luckily I have a dual Opteron and it's single-threaded so only affects one, leaving the other free, and I've ran with it doing that for hours when it triggered when I had several job windows open at once and it wasn't convenient to shut down X and restarting kompmgr wasn't working, but it's not an environment one would exactly call "stable", and once in awhile... =8^(  OTOH, I'm deliberately running X with these bleeding edge features turned on, knowing the risk, so...

Back to pan.  If you are worried about the performance, a manual sync trigger would be nice.  As I said, I think switching groups is an appropriate time at minimum, and that's what I formerly used as my sync trigger, but a button and/or menu entry that I could assign a hotkey too (thanks! =8^) would come in handy for those several hundred new posts in a group times.

However bad it might be for performance, performance /really/ suffers when you have to go back thru re-marking stuff as read!
Comment 5 Charles Kerr 2006-08-03 00:05:53 UTC
*** Bug 349731 has been marked as a duplicate of this bug. ***
Comment 6 Sam Morris 2006-08-30 11:01:08 UTC
_How_ slow is the writing of the .newsrc?

A related problem is that I lose my settings and read messages when logging out of GNOME. Pan should definately connect to the session manager so it can be given a chance to save its state when the user logs out.
Comment 7 Charles Kerr 2006-09-16 22:23:24 UTC
After the discussion in about this bug on pan-users today, I decided
to put in some timing tests to see if there was any way I could speed
up saving enough that it could be done periodically.

To my surprise, the various rounds of speedups over the last couple
of months have made this pretty speedy.

Right now, the xover files (~/.pan2/groups/groupname) are already saved
when you get new headers, and server information (~/.pan2/servers.xml)
are saved whenever they're changed.  I've added code to save everything
else each time you change groups.  (prefs, group prefs, newsrc, xov).
Comment 8 Charles Kerr 2006-09-16 22:34:33 UTC
Created attachment 72916 [details] [review]
0.112 patch

give this a try...
Comment 9 Duncan 2006-09-16 22:53:31 UTC
(In reply to comment #7)
> Right now, the xover files (~/.pan2/groups/groupname) are already saved
> when you get new headers, and server information (~/.pan2/servers.xml)
> are saved whenever they're changed.  I've added code to save everything
> else each time you change groups.  (prefs, group prefs, newsrc, xov).

That'll be livable, anyway.  In old-pan, when going thru a group with tens of thousands of posts, I was used to clicking to a different group and back, every 500 to 2000 posts, just to save place in case of a crash.  I still find myself doing it once in awhile, then realizing it's not going to do any good and that I have to quit and restart.  At least I'll have the switch-groups save back again, now.

The thing I don't quite get is that it can't be /that/ slow, given a quit and restart, which must load and setup pan itself as well as the group once I go back to it, isn't bad any more -- unlike old-pan where I could start pan, then go make myself something to drink/eat while I waited for pan to finish loading, especially if little of pan's data remained in cache.  Back then, I got so I'd leave pan running, to avoid restarting.  At least that isn't necessary any longer =8^), but it was still a pain to quit and restart just to save state, so I'm glad switching groups will do it again once this gets in. =8^)