Comments (11)
WOOHOO massive improvements in compile times!
on 3570k:
First compile:
Finished release [optimized + debuginfo] target(s) in 88.18 secs
Second compile after very small changes:
Finished release [optimized + debuginfo] target(s) in 5.77 secs
Command used:
cargo rustc --release -- -Zincremental=/tmp/
from citybound.
Any ideas why the compile time is as high as it is? Mine are consistently around 50s and I'm running a 6700K.
from citybound.
I think if we have a more recent compiler version, we can take advantage of some of the work that has been going on with incremental compilation in the rust compiler.
I'm not sure what else we can do except for maybe splitting the project into even more crates (as crates is rust's smallest compilation unit, vs files in C/C++)
from citybound.
Using a newer nightly would be nice. Is there a specific language change that prohibits us from upgrading?
Splitting the project up should probably only be done when it makes sense logically, not just as a method to combat compile times.
from citybound.
Just attempted to upgrade, but macros have a weird error
error[E0428]: a type named `AddBatch` has already been defined in this module
--> lib/monet/src/renderer/mod.rs:52:1
|
51 | #[derive(Compact, Clone)]
| ------- previous definition of `AddBatch` here
52 | pub struct AddBatch {
| _^ starting here...
53 | | pub scene_id: usize,
54 | | pub batch_id: u16,
55 | | pub thing: Thing,
56 | | }
| |_^ ...ending here: `AddBatch` already defined
error[E0428]: a type named `UpdateThing` has already been defined in this module
--> lib/monet/src/renderer/mod.rs:71:1
|
70 | #[derive(Compact, Clone)]
| ------- previous definition of `UpdateThing` here
71 | pub struct UpdateThing {
| _^ starting here...
72 | | pub scene_id: usize,
73 | | pub thing_id: u16,
74 | | pub thing: Thing,
75 | | pub instance: Instance,
76 | | pub is_decal: bool,
77 | | }
| |_^ ...ending here: `UpdateThing` already defined
error[E0428]: a type named `AddSeveralInstances` has already been defined in this module
--> lib/monet/src/renderer/mod.rs:113:1
|
112 | #[derive(Compact, Clone)]
| ------- previous definition of `AddSeveralInstances` here
113 | pub struct AddSeveralInstances {
| _^ starting here...
114 | | pub scene_id: usize,
115 | | pub batch_id: u16,
116 | | pub instances: CVec<Instance>,
117 | | }
| |_^ ...ending here: `AddSeveralInstances` already defined
error[E0428]: a type named `AddDebugText` has already been defined in this module
--> lib/monet/src/renderer/mod.rs:136:1
|
135 | #[derive(Compact, Clone)]
| ------- previous definition of `AddDebugText` here
136 | pub struct AddDebugText {
| _^ starting here...
137 | | pub scene_id: usize,
138 | | pub key: CVec<char>,
139 | | pub text: CVec<char>,
140 | | pub color: [f32; 4],
141 | | }
| |_^ ...ending here: `AddDebugText` already defined
error[E0428]: a type named `Thing` has already been defined in this module
--> lib/monet/src/thing.rs:7:1
|
6 | #[derive(Compact, Debug)]
| ------- previous definition of `Thing` here
7 | pub struct Thing {
| _^ starting here...
8 | | pub vertices: CVec<Vertex>,
9 | | pub indices: CVec<u16>,
10 | | }
| |_^ ...ending here: `Thing` already defined
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `renderer::AddBatch`:
--> lib/monet/src/renderer/mod.rs:51:10
|
51 | #[derive(Compact, Clone)]
| ^^^^^^^ ----- first implementation here
| |
| conflicting implementation for `renderer::AddBatch`
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `renderer::UpdateThing`:
--> lib/monet/src/renderer/mod.rs:70:10
|
70 | #[derive(Compact, Clone)]
| ^^^^^^^ ----- first implementation here
| |
| conflicting implementation for `renderer::UpdateThing`
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `renderer::AddSeveralInstances`:
--> lib/monet/src/renderer/mod.rs:112:10
|
112 | #[derive(Compact, Clone)]
| ^^^^^^^ ----- first implementation here
| |
| conflicting implementation for `renderer::AddSeveralInstances`
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `renderer::AddDebugText`:
--> lib/monet/src/renderer/mod.rs:135:10
|
135 | #[derive(Compact, Clone)]
| ^^^^^^^ ----- first implementation here
| |
| conflicting implementation for `renderer::AddDebugText`
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `thing::Thing`:
--> lib/monet/src/thing.rs:6:10
|
6 | #[derive(Compact, Debug)]
| ^^^^^^^ ----- first implementation here
| |
| conflicting implementation for `thing::Thing`
from citybound.
Haha managed to get it working from just messing with the macros
from citybound.
See #81
from citybound.
That was sorely needed. Doing small changes in the movement code was a nightmare last night. Great job!
from citybound.
Yes!!!!
from citybound.
Compile times do seem much better, as long as the changes don't touch the horrible monster-function in game/planning/mod.rs - but that should get better once I address #25
from citybound.
I started to pull out functionality into crates in c4b2477, in an effort to help the Rust compiler
from citybound.
Related Issues (20)
- some error
- Exception while moving planning point HOT 1
- Error: Cannot set property 'inject' of undefined HOT 4
- the error HOT 2
- Error: oldState is not defined
- Planning Mode: Undo button clicks have no effect HOT 1
- Planning Mode: USER INTERFACE BROKE when attempting to select existing road node HOT 1
- Crash with road tool
- Interface breaks when trying to add roads that branch off of other roads.
- Missing doc, software architecture and model details
- FsEventWatcher not found in 'notify' HOT 1
- Where is the developer? HOT 2
- Broken UI
- Looking for collaborators for a version of cityboaund to provide citizen urban design tool HOT 1
- Some sort of port issue HOT 1
- Website typo: "break" should be "brake"
- Did the project die? Some bugs! HOT 5
- Does not run on Debian Linux HOT 2
- Road drawing fails with 'New meshes too big for one queue' HOT 1
- Clicking and dragging circles associated with Administrative region causes UI failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citybound.