Re: WSGI: creating a new tracker instance for each request?

Thomas Arendsen Hein <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
* Christof Meerwald <[email protected]> [20200205 00:08]:
> just noticed that in wsgi_handler.py we create a new tracker instance
> for each request:
> 
>   tracker = roundup.instance.open(self.home, not self.debug)
> 
> is that really intentional/needed? It seems like a significant
> performance issue to me.

It cost a bit of performance.

Some quick measurements:
echo -e 'help'|roundup-admin -i . -> 0.280s
echo -e 'display user1'|roundup-admin -i . -> 0.502s
echo -e 'display user1\ndisplay user2'|roundup-admin -i . -> 0.505s

So I'd say about 0.2 seconds on our roundup server, which is a VM on
a slightly old hardware.


The only problem that I see is that with database backends that
allow concurrent access without a global lock, commits of a tracker
state may happen too early.

Is it correct that rollbacks are not used with web requests?

Regards,

Thomas

-- 
Thomas Arendsen Hein <[email protected]>
OpenPGP key: https://intevation.de/~thomas/thomas_pgp.asc (0xD45DE28FF3A2250C)
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.