mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add a profile_traits
crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and only rebuilds `profile` and `servo`) which is much lower than it used to be. In comparison, a rebuild after touching components/profile_traits/mem.rs takes 294 seconds and rebuilds many more crates. This change also removes some unnecessary crate dependencies in `net` and `net_traits`.
This commit is contained in:
parent
826b722202
commit
092507d23c
37 changed files with 269 additions and 225 deletions
|
@ -37,8 +37,8 @@ path = "../plugins"
|
|||
[dependencies.net_traits]
|
||||
path = "../net_traits"
|
||||
|
||||
[dependencies.profile]
|
||||
path = "../profile"
|
||||
[dependencies.profile_traits]
|
||||
path = "../profile_traits"
|
||||
|
||||
[dependencies.util]
|
||||
path = "../util"
|
||||
|
|
|
@ -42,9 +42,9 @@ use log;
|
|||
use msg::compositor_msg::ScrollPolicy;
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineExitType, PipelineId};
|
||||
use profile::mem::{self, Report, ReportsChan};
|
||||
use profile::time::{self, ProfilerMetadata, profile};
|
||||
use profile::time::{TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use profile_traits::mem::{self, Report, ReportsChan};
|
||||
use profile_traits::time::{self, ProfilerMetadata, profile};
|
||||
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use net_traits::{load_bytes_iter, ResourceTask};
|
||||
use net_traits::image_cache_task::{ImageCacheTask, ImageCacheResult, ImageCacheChan};
|
||||
use script::dom::bindings::js::LayoutJS;
|
||||
|
|
|
@ -32,7 +32,7 @@ extern crate bitflags;
|
|||
extern crate "plugins" as servo_plugins;
|
||||
extern crate net_traits;
|
||||
#[macro_use]
|
||||
extern crate profile;
|
||||
extern crate profile_traits;
|
||||
|
||||
#[macro_use]
|
||||
extern crate util;
|
||||
|
|
|
@ -20,7 +20,7 @@ use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_
|
|||
use wrapper::{PostorderNodeMutTraversal, UnsafeLayoutNode};
|
||||
use wrapper::{PreorderDomTraversal, PostorderDomTraversal};
|
||||
|
||||
use profile::time::{self, ProfilerMetadata, profile};
|
||||
use profile_traits::time::{self, ProfilerMetadata, profile};
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicIsize, Ordering};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue