Closed Bug 951713 Opened 11 years ago Closed 11 years ago

CacheIOThread causes activity spikes during idle

Categories

(Core :: Networking: Cache, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: rvitillo, Assigned: mayhemer)

References

Details

Attachments

(1 file, 1 obsolete file)

The event loop of CacheIOThread is executed every five seconds during idle (http://dxr.mozilla.org/mozilla-central/source/netwerk/cache2/CacheIOThread.cpp#125).
Blocks: 948528
I think this is just a debugging tool for me.  There is no reason to tick at all.
Great, do you want me to submit a patch or are you going to take care of it?
I'll do it.
Assignee: rvitillo → honzab.moz
Attached patch v1 (obsolete) — Splinter Review
Attachment #8349611 - Flags: review?(michal.novotny)
Comment on attachment 8349611 [details] [diff] [review]
v1

Review of attachment 8349611 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/cache2/CacheIOThread.cpp
@@ +167,5 @@
>  
>        if (EventsPending())
>          goto loopStart;
>  
> +    } while (true);

With this change, all gotos can be replaced by continue except the one in the for loop. Could you please rewrite the loop so that we can get rid of the goto statements?
Attachment #8349611 - Flags: review?(michal.novotny) → review+
Attached patch v2Splinter Review
Here it is.  Thanks for the quick rev!
Attachment #8349611 - Attachment is obsolete: true
Attachment #8349769 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/86eb809847a3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Depends on: 956331
Blocks: cache2enable
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: