I agree 100% with Magnus' comment 1: > > If someone wants to do that, I think they would need to set a pref. > > I would expect needlessly trying to load a library somewhat of a performance hit. Something like > > let rnp = Services.prefs.getCharPref("mail.opengpp.rnplib", "rnp"); a) The alternative library should not be preferred over the stock lib, but there should be an explicit choice. I'd be surprised, if there's a library with a certain name in the lib path anywhere in the system, and it automatically overrides my normal PGP lib. b) The library name should not be hardcoded. That allows for multiple alternatives, not just one. c) As Magnus said, it's faster to read a pref than search for a library in the whole lib path. That's a penalty that all users would have to pay, even those who use the stock lib. Whereas a pref read is neglible and fast. Other than this, I think the patch in general makes sense.
Bug 1698540 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I agree 100% with Magnus' comment 1: > > If someone wants to do that, I think they would need to set a pref. > > I would expect needlessly trying to load a library somewhat of a performance hit. Something like > > let rnp = Services.prefs.getCharPref("mail.opengpp.rnplib", "rnp"); a) The alternative library should not be preferred over the stock lib, but there should be an explicit choice. I'd be surprised, if there's a library with a certain name in the lib path anywhere in the system, and it automatically overrides my normal PGP lib. b) The library name should not be hardcoded. A configurable name allows for multiple alternatives, not just one. c) As Magnus said, it's faster to read a pref than search for a library in the whole lib path. That's a penalty that all users would have to pay, even those who use the stock lib. Whereas a pref read is neglible and fast. Other than this, I think the patch in general makes sense.
It's a reasonable patch. Just one point, I agree 100% with Magnus' comment 1: > > If someone wants to do that, I think they would need to set a pref. > > I would expect needlessly trying to load a library somewhat of a performance hit. Something like > > let rnp = Services.prefs.getCharPref("mail.opengpp.rnplib", "rnp"); a) The alternative library should not be preferred over the stock lib, but there should be an explicit choice. I'd be surprised, if there's a library with a certain name in the lib path anywhere in the system, and it automatically overrides my normal PGP lib. b) The library name should not be hardcoded. A configurable name allows for multiple alternatives, not just one. c) As Magnus said, it's faster to read a pref than search for a library in the whole lib path. That's a penalty that all users would have to pay, even those who use the stock lib. Whereas a pref read is neglible and fast. Other than this, I think the patch in general makes sense.