Closed Bug 277627 Opened 20 years ago Closed 20 years ago

make openCacheEntry take an ACString parameter instead of string

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

This makes things just a bit more efficient (avoid a length calculation), especially since almost all of the callers already have an nsACString.
Attached patch patch (obsolete) — Splinter Review
Attachment #170724 - Flags: superreview?(darin)
Attachment #170724 - Flags: review?(darin)
Comment on attachment 170724 [details] [diff] [review] patch don't forget nsICacheEntryInfo::key :-) also, the cache key is not required to conform to any character encoding. it was designed to be any null-terminated byte array. that said, i think it is probably a safe assumption that all consumers pass UTF-8 (if non-ASCII). for a while, i've wanted to fix all of the cache interfaces to use the string classes instead.
No need to enforce UTF8 now then, I'll just use ACString.
Summary: make openCacheEntry take an AUTF8String parameter instead of string → make openCacheEntry take an ACString parameter instead of string
Attached patch revised patchSplinter Review
Attachment #170724 - Attachment is obsolete: true
Attachment #170762 - Flags: superreview?(darin)
Attachment #170762 - Flags: review?(darin)
Comment on attachment 170762 [details] [diff] [review] revised patch I would really like to see the rest of the |string|'s in the cache API switched over too, but that can wait. Thanks for the patch!
Attachment #170762 - Flags: superreview?(darin)
Attachment #170762 - Flags: superreview+
Attachment #170762 - Flags: review?(darin)
Attachment #170762 - Flags: review+
Attachment #170724 - Flags: superreview?(darin)
Attachment #170724 - Flags: review?(darin)
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Keywords: perf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: