View Single Post
Old 02-18-2011, 06:52 PM   #12
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
check_library was refactored a while ago to call library_changed after it completes (see actions/choose_library.py).

However, I would encourage you to not hold references to the db unnecessarily. Calling self.gui.library_view.model().db is fast enough that as long as you dont have it in an inner loop you wont see any practical performance implications.
It wasn't so much for performance reasons as just passing to that class the least scope it needed to know about - an object design choice. Now I'll just pass self.gui from the action class instead and forget about trying to be too clever
kiwidude is offline   Reply With Quote