You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why not leave that optimisation as a task for spatsoc? Caching is one of the things we really shouldn't go into, I believe - "There are only two hard things in Computer Science: cache invalidation and naming things."
In a contrived example, sp:CRS() is reduced from 9.00s to 0.12s by caching in the rgrass7 style, which is basically using a list as an associative array. At some stage I'll run revdeps with sp with caching. From reading package code, tests and examples, many (very many) use the same old Proj.4 string representation in loops and *apply, as though looking up the CRS/crs was simply assigning a string, not checking a string against an external SQL database. It was originally just assigning a string, and I think many see it like that.
Activity
edzer commentedon Feb 23, 2021
Why not leave that optimisation as a task for
spatsoc? Caching is one of the things we really shouldn't go into, I believe - "There are only two hard things in Computer Science: cache invalidation and naming things."rsbivand commentedon Feb 23, 2021
In a contrived example, sp:CRS() is reduced from 9.00s to 0.12s by caching in the rgrass7 style, which is basically using a list as an associative array. At some stage I'll run revdeps with sp with caching. From reading package code, tests and examples, many (very many) use the same old Proj.4 string representation in loops and *apply, as though looking up the CRS/crs was simply assigning a string, not checking a string against an external SQL database. It was originally just assigning a string, and I think many see it like that.