--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAN6muBtpaomJB31gztTbEMvcTw-aegN9GtnwgRxAgNOTUV1YeQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAPG_qM6B8x_Xsd_HSG%2Bhv9Kap_W_7ef-hPW4CE4y9eTJC5N5UA%40mail.gmail.com.
What kind of work does this task do for up-to-1.5-seconds? e.g. is it CPU-bound, or I/O-bound, or some mix of the two?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALekkJe4%2BjY8h7nQwZ9FTzcC%2Bx_K8npZmG5YMRcGjmwA5YA%2BSg%40mail.gmail.com.
Hi Wez,On Fri, Jan 18, 2019, 19:05 Wez <w...@chromium.org wrote:What kind of work does this task do for up-to-1.5-seconds? e.g. is it CPU-bound, or I/O-bound, or some mix of the two?It is a mix with a focus on i/o as much as I can tell, but it's really inside DirectWrite. We're enumerating system fonts and retrieving name properties from them using DWrite API. To which degree this data is cached inside DirectWrite and to which it needs to be loaded from the fonts and access the disk, I cannot tell.> Running a 1.5 second task on every startup seems pretty expensive, and also suggests that the resulting lookup table may be rather large?The size of the lookup table is between 40kb and 120kb, rather on the lower end. And we can limit that if a user has an excessitve amount of fonts installed.The 1.5 second task duration is on the very slow end, it's rather a bit lower than that in most cases.
As for the original question, I think the best way to do it right now is to use https://cs.chromium.org/chromium/src/chrome/browser/after_startup_task_utils.h?sq=package:chromium&g=0&l=18
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2B-Nxqja-ci-CrN9DbtXRaY3aHtSVm%2BM3LGLpPTcv9v-_ocdfA%40mail.gmail.com.
On Sat, Jan 19, 2019 at 4:29 PM Patrick Monette <pmon...@chromium.org> wrote:As for the original question, I think the best way to do it right now is to use https://cs.chromium.org/chromium/src/chrome/browser/after_startup_task_utils.h?sq=package:chromium&g=0&l=18The new guidance is to use PostTaskWithTraits; see https://crbug.com/887407. Something like: base::PostTaskWithTraits(FROM_HERE, {base::TaskPriority::BEST_EFFORT, base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, ...);, but don't quote me on that.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAKQnr0SSHwKozKEZYQn7J2wDBvCi9-2zci2MqK5TjeEFLOAW%3Dg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
Will you be adding metrics to record how long this task takes in the wild? Correlating that with font counts or other relevant details could also be helpful. Some users have pretty huge font collections and the disk I/O alone to query them all may be prohibitive.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.