Re: [gmime-devel] GMime 2.99 - no more global variables



On 2/8/2017 7:30 PM, Daniel Kahn Gillmor wrote:
On Tue 2017-02-07 18:29:51 -0500, Jeffrey Stedfast wrote:
On 2/7/2017 2:22 PM, Daniel Kahn Gillmor wrote:
On Tue 2017-02-07 10:07:33 -0500, Jeffrey Stedfast wrote:

This is just a status update. At this point, I've gotten GMime to the point
where there are no longer any global variables.
thank you for this!

1. g_mime_init() no longer takes a flags argument.
Is it possible that we don't need g_mime_init() at all any longer?
Still need it for internal iconv caches
Presumably the iconv caches could be managed by a "gmime context"
object, if you follow the library context object model proposed by
libabc.  that's fine if you don't want to do it, just thought i'd raise
it as a common pattern to consider.

FWIW, I managed to get rid of the iconv caches. After a bit of thought, I decided they weren't worth keeping. The idea was to keep iconv_t descriptors open for reuse because they were "expensive" to open on systems like Solaris (who cares about Solaris anymore?), but on more modern systems the overhead is probably negligible. I couldn't tell the difference on my Linux VM before/after making the change.

Also managed to get rid of the mutex lock needed by the Message-Id generator after changing the approach for generating the unique part of the id.

Overall, I think all (or almost all?) of the mutexes have been dropped which is overall a Good Thing(tm).

Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]