Repository: servo/servo
File: components/config/prefs.rs (Rust)

Code before:
            js_mem_gc_high_frequency_low_limit_mb: 100,
            js_mem_gc_high_frequency_time_limit_ms: 1000,
            js_mem_gc_incremental_enabled: true,
            js_mem_gc_incremental_slice_ms: 10,
            js_mem_gc_low_frequency_heap_growth: 150,
            js_mem_gc_per_zone_enabled: false,
            js_mem_gc_zeal_frequency: 100,
            js_mem_gc_zeal_level: 0,
            js_mem_max: -1,
            js_native_regex_enabled: true,
            js_offthread_compilation_enabled: true,
            js_shared_memory: true,
            js_throw_on_asmjs_validation_failure: false,
            js_throw_on_debuggee_would_run: false,
            js_timers_minimum_duration: 1000,
            js_wasm_baseline_enabled: true,
            js_wasm_enabled: true,
            js_wasm_ion_enabled: true,
            js_werror_enabled: false,
            largest_contentful_paint_enabled: false,
            layout_animations_test_enabled: false,
            layout_columns_enabled: false,
            layout_container_queries_enabled: false,
            layout_css_attr_enabled: false,
            // TODO(mrobinson): This should likely be based on the number of processors.
            layout_css_stylo_threads: 3,
            layout_css_transition_behavior_enabled: true,
            layout_flexbox_enabled: true,
            layout_grid_enabled: false,
            layout_style_sharing_cache_enabled: true,
            layout_unimplemented: false,
            layout_variable_fonts_enabled: false,
            layout_writing_mode_enabled: false,
            media_glvideo_enabled: false,
            media_testing_enabled: false,
            network_connection_timeout: 15,
            network_enforce_tls_enabled: false,
            network_enforce_tls_localhost: false,
            network_enforce_tls_onion: false,
            network_http_cache_disabled: false,
            network_http_proxy_uri: String::new(),
            network_https_proxy_uri: String::new(),
            network_http_no_proxy: String::new(),
            network_http_cache_size: 5000,
            network_local_directory_listing_enabled: true,
            network_mime_sniff: false,
            network_use_webpki_roots: false,
            session_history_max_length: 20,
            shell_background_color_rgba: [1.0, 1.0, 1.0, 1.0],
            threadpools_async_runtime_workers_max: 6,
            threadpools_fallback_worker_num: 3,

Review comment (suggestion):
This name is now inaccurate because it doesn't just affect the number of CSS styling threads, but also the number of layout threads that run when styling is done. How about calling it "layout_and_styling_threads?" I don't think we should expose a confusing name to the API just because of the name that Stylo uses internally.

Code after:
            js_mem_gc_high_frequency_low_limit_mb: 100,
            js_mem_gc_high_frequency_time_limit_ms: 1000,
            js_mem_gc_incremental_enabled: true,
            js_mem_gc_incremental_slice_ms: 10,
            js_mem_gc_low_frequency_heap_growth: 150,
            js_mem_gc_per_zone_enabled: false,
            js_mem_gc_zeal_frequency: 100,
            js_mem_gc_zeal_level: 0,
            js_mem_max: -1,
            js_native_regex_enabled: true,
            js_offthread_compilation_enabled: true,
            js_shared_memory: true,
            js_throw_on_asmjs_validation_failure: false,
            js_throw_on_debuggee_would_run: false,
            js_timers_minimum_duration: 1000,
            js_wasm_baseline_enabled: true,
            js_wasm_enabled: true,
            js_wasm_ion_enabled: true,
            js_werror_enabled: false,
            largest_contentful_paint_enabled: false,
            layout_animations_test_enabled: false,
            layout_columns_enabled: false,
            layout_container_queries_enabled: false,
            layout_css_attr_enabled: false,
            layout_css_transition_behavior_enabled: true,
            layout_flexbox_enabled: true,
            layout_grid_enabled: false,
            layout_style_sharing_cache_enabled: true,
            // TODO(mrobinson): This should likely be based on the number of processors.
            layout_threads: 3,
            layout_unimplemented: false,
            layout_variable_fonts_enabled: false,
            layout_writing_mode_enabled: false,
            media_glvideo_enabled: false,
            media_testing_enabled: false,
            network_connection_timeout: 15,
            network_enforce_tls_enabled: false,
            network_enforce_tls_localhost: false,
            network_enforce_tls_onion: false,
            network_http_cache_disabled: false,
            network_http_proxy_uri: String::new(),
            network_https_proxy_uri: String::new(),
            network_http_no_proxy: String::new(),
            network_http_cache_size: 5000,
            network_local_directory_listing_enabled: true,
            network_mime_sniff: false,
            network_use_webpki_roots: false,
            session_history_max_length: 20,
            shell_background_color_rgba: [1.0, 1.0, 1.0, 1.0],
            threadpools_async_runtime_workers_max: 6,
            threadpools_fallback_worker_num: 3,