On Thu, Oct 11, 2018 at 7:27 PM Jonathan Vanasco <jvana...@gmail.com> wrote: > > I try to stay away from Events in production. > > I now need to catch modifications of a particular column in order to expire > some data cached onto the object. > > Is there a measurable overhead for catching a single column? e.g. > > @event.listens_for(ObjectClass.column, 'set') > > The alternative is to use a setter function - which I am fine with. > > This is in an app that needs to be a bit more performance oriented, so I > figured I would ask before doing a benchmark.
overhead is fairly minimal, but also, a "set" is something you're doing at very specific times, so, how much is this "set" being called typically? > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at https://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.