Re: Should roundup-admin reopen the tracker on every command?
Ralf Schlatterbeck <[email protected]> Tue, 18 Apr 2023 09:06:40 +0200
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Apr 12, 2023 at 11:34:47AM -0400, John P. Rouillard wrote: > Hi all: > > I came across a wierd crash/error today in roundup-admin. I fixed the > underlying error caused by my incorrectly re-initializing/resetting > option validation (changeset: 7251:ab0ea9f03866) when parsing the > config.ini configuration. > > However, I noticed that roundup-admin in interactive mode reopens the > tracker for every command. On the first admin command, it opens the > tracker and the database. It then caches the database handle so it is > opened only one while roundup-admin is running. > > Can anybody come up with a reason the tracker needs to be reopened > every time? I would like to cache the tracker instance. > > This would eliminate reparsing the configuration for every command, > and I don't think it has any downside. But I am not sure about that. I can't think of a use-case where your planned change would break anything. But I'm mostly using roundup-admin in one-shot mode (where I'm specifying the command on the command-line), e.g., something like roundup-admin -i /path/to/tracker display issue42 So in my case when I issue several roundup-admin commands everything will still be re-parsed and re-opened for each command. One of the reasons for my way of using it is that I'm used to the command-line history processing of my shell... So changing this to cache the instance is fine but the time saved in roundup-admin would maybe not be worth the effort of the fix? Especially when considering that many users probably don't use the interactive mode? Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]