Perl 6 - the future is here, just unevenly distributed

IRC log for #askriba, 2017-10-27

| Channels | #askriba index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:57 ilbot2 joined #askriba
01:57 Topic for #askriba is now Where random Perl5-related questions get definitive answers. Conversation log: https://is.gd/askriba_irclog (searchable). Currently no preset business hours due to low demand: just highlight my name and I'll answer ASAP \o/
04:04 dboehmer joined #askriba
05:05 ilbot2 joined #askriba
05:06 haarg joined #askriba
05:06 dboehmer joined #askriba
05:06 ashimema joined #askriba
05:06 SysPete joined #askriba
05:06 vanstyn joined #askriba
05:06 karjala joined #askriba
05:06 frew joined #askriba
05:06 ribasushi joined #askriba
05:06 ChanServ joined #askriba
05:06 Topic for #askriba is now Where random Perl5-related questions get definitive answers. Conversation log: https://is.gd/askriba_irclog (searchable). Currently no preset business hours due to low demand: just highlight my name and I'll answer ASAP \o/
07:34 karjala_ joined #askriba
15:56 karjala_ joined #askriba
17:09 karjala_ I'm creating a function, as a shortcut, that will return $schema->resultset('MyTable')
17:10 karjala_ Is there any benefit in "caching" this value? ie storing $schema->resultset('MyTable') somewhere for the duration of the webserver, and returning that value whenever the function is called
17:10 karjala_ Is it even safe to do so?
17:25 ribasushi karjala_: whether it is safe - "it depends"
17:25 ribasushi karjala_: the real question is: what are you trying to optimize?
17:25 ribasushi if you haven't actually executed an NYTProf or similare measurements - do not add any extra caching *anywhere*
17:25 karjala_ first of all number of characters typed, and secondly CPU power
17:25 ribasushi it is not likely to end well
17:26 ribasushi there is no caching mechanism without failure cases that you'd have to account for eslewhere
17:26 karjala_ ok
17:27 ribasushi so if your rationale is "the CPU will do a little less work" - this is terribly misguided
17:27 karjala_ why?
17:27 karjala_ because it might save 0.01%?
17:27 karjala_ ok
17:27 karjala_ i guess
17:27 ribasushi because when ( not if ) you run into a problem, it will be incredibly hard to debug/reason about
17:27 karjala_ yes
17:28 karjala_ I hadn't thought about problems
17:28 ribasushi and any and all savings will be dwarfed and blown away by the time you will have to spend figuring out what happened
17:29 ribasushi karjala_: also https://twitter.com/codinghorror/status/506010907021828096?lang=en
17:29 karjala_ :D
17:32 karjala_ thanks
17:32 karjala_ I won't cache
17:32 ribasushi ++
23:40 shit joined #askriba
23:56 slimer joined #askriba
23:56 slimer THE LODE RADIO IS LIVE AGAIN YAY!!
23:57 slimer call 415-349-5666
23:57 slimer live show @ https://www.youtube.com/watch?v=rXWx3lPlwgE
23:57 slimer or go to #lrh efnet irc for more information.
23:57 slimer karjala_ ilbot2 haarg dboehmer SysPete vanstyn karjala frew ribasushi ChanServ
23:57 slimer left #askriba

| Channels | #askriba index | Today | | Search | Google Search | Plain-Text | summary