Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(510)

Issue 114050043: code review 114050043: ogle/program/server: do less I/O when printing maps (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 9 months ago by r
Modified:
9 years, 9 months ago
Reviewers:
nigeltao
CC:
nigeltao
Visibility:
Public.

Description

ogle/program/server: do less I/O when printing maps The buckets are stored in contiguous blocks of memory preceded by a header. Introduce a cache so the entire structure can be read once in the typical case, with printValueAt using the cache to print values in the bucket. If the structure is a map of maps, the code will still work but only the innermost map will exploit the cache well. That's a rare case anyway, and no worse than the current situation.

Patch Set 1 #

Total comments: 2

Patch Set 2 : diff -r dd4156090298 https://code.google.com/p/ogle #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -15 lines) Patch
M program/server/print.go View 8 chunks +48 lines, -15 lines 0 comments Download

Messages

Total messages: 3
r
Hello nigeltao, I'd like you to review this change to https://code.google.com/p/ogle
9 years, 9 months ago (2014-07-17 19:26:38 UTC) #1
nigeltao
LGTM. https://codereview.appspot.com/114050043/diff/1/program/server/print.go File program/server/print.go (right): https://codereview.appspot.com/114050043/diff/1/program/server/print.go#newcode91 program/server/print.go:91: p.cache = p.cache[0:0] You can drop the first ...
9 years, 9 months ago (2014-07-21 07:31:29 UTC) #2
r
9 years, 9 months ago (2014-07-29 16:50:48 UTC) #3
*** Submitted as https://code.google.com/p/ogle/source/detail?r=a875c179a54f ***

ogle/program/server: do less I/O when printing maps
The buckets are stored in contiguous blocks of memory preceded by a header.
Introduce a cache so the entire structure can be read once in the typical
case, with printValueAt using the cache to print values in the bucket.
If the structure is a map of maps, the code will still work but
only the innermost map will exploit the cache well.
That's a rare case anyway, and no worse than the current situation.

LGTM=nigeltao
R=nigeltao
https://codereview.appspot.com/114050043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b