<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:HelveticaNeue;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Yah lets do that.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Paul Ramsey <pramsey@cleverelephant.ca> <br><b>Sent:</b> Thursday, January 18, 2024 6:50 PM<br><b>To:</b> Sandro Santilli <strk@kbt.io><br><b>Cc:</b> Regina Obe <lr@pcorp.us>; PostGIS Development Discussion <postgis-devel@lists.osgeo.org><br><b>Subject:</b> Re: PARANOIA_LEVEL<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I feel like the most “standard” thing to do would be to convert them all to assert()s and then have a<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>—enable-assert <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>option. And then we can add other asserts to our heart’s content without having to know about this weird option Dave invented back in 2004.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>P<o:p></o:p></p><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On Jan 18, 2024, at 2:25 PM, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>There are only a handful of uses (grep for "PARANOIA_LEVEL >”) and except for one they are all testing > 0. So I think an on/off, or potentially just strip them out. I never flip them on, on purpose, and have never assumed anything other than that it was always off (imagine my surprise to find it on).<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>P<o:p></o:p></p><div><div><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On Jan 18, 2024, at 2:23 PM, Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>On Thu, Jan 18, 2024 at 04:25:55PM -0500, Regina Obe wrote:<br style='caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px'><br></span><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>On Thu, Jan 18, 2024 at 08:13:04AM -0800, Paul Ramsey wrote:<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>Just a reminder, if you build postgis with —enable-debug, the<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>PARANOIA_LEVEL gets bumped up, and that can have huge performance effects<br>which make any kind of benchmarking a whack-a-mole process.<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'><br>I guess I internalized the idea that —enable-debug would just drop a ‘-g’ flag<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>into the build and that’s about it, but in fact it has these other deleterious effects.<br>Among other things, it makes lwcollection_add_lwgeom a couple orders of<br>magnitude slower.<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'><br>Anyways, super important for anyone building for release too. You aren’t just<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>getting debug symbols!<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'><br>I wonder if we should split off —enable-debug from other “developer<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'>affordances”, in a different option, kind of like how pgsql as —enable-cassert and<br>some other #define only options for things like memory checking and so on.<br><br>+1 --enable-paranoia would sound good<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'><br>+1<o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:10.0pt;font-family:"HelveticaNeue",serif'><br>Actually I guess it should be --with-paranoia-level N<br><br>--strk;</span><o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>