gtalarico / revitapidocs

Online Revit API Documentation: 2015, 2016, 2017, 2017.1, 2018
http://www.revitapidocs.com
33 stars 20 forks source link

Compile search_db pattern before searching #77

Closed gtalarico closed 7 years ago

gtalarico commented 7 years ago

https://github.com/gtalarico/revitapidocs/blob/master/app/utils.py#L96

using re.compile() and saving the resulting regular expression object for reuse is more efficient when the expression will be used several times in a single program

https://docs.python.org/2/library/re.html#re.compile

gtalarico commented 7 years ago

nevermind, it was already getting compiled on view/search api function: https://github.com/gtalarico/revitapidocs/blob/master/app/views.py#L91