View Single Post
Old 12-16-2014, 09:40 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,389
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
initialize() is not called every time the plugin is run, only every time it is initialized. You are probably confused because you are talking about a file type plugin run when adding books. If you add a single book at a time, a new worker processes is started for every add, which means the plugin is initialized for every add. However, if you do a recursive add, with more books than the number of CPU cores there will be a max number of worker processes equal to the number of cores on your system (say n) and initialize() will be caled only n times which is less than the number of books being added.
kovidgoyal is offline   Reply With Quote