Comments (4)
Fixed, with changes to grunt it only compiles the full project if core files change, and if test/example code changes it only recompiles that section. We can still do a little more cleverness; if we make a change to the core files that does not change the typing, then there is no need to recompile the examples and test code since contract is unchanged. We can test this by diffing the plottable.d.ts file before and after compilation.
from plottable.
Right now our build (& times) looks like this:
compile core - 3s
compile test - 3s
compile examples - 3s
I suspect there is substantial overhead (about 3s) in running a seperate compile task, which means that compiling core, test, and examples is inefficient when we could just compile everything in around 3s in a single go. The reason we don't right now is that it's convenient to have all of the core compilation go to a single output file, but we want to send test compiled artifacts and examples compiled artifacts to different places. If we compiled everything to intermediate representation (eg axis.ts -> axis.js) and then concatenate the results together into the final script (plottable) then we would have a 3s full build instead of a 9s full build. The trick would be getting the scripts concatenated in the right order I think, right now the tscompiler is handling this for us. However, we know the order in which to put them (it is right there in reference.ts) so it would be as "simple" as writing a parser that uses a regex to suck it out of reference.ts and then concats them all together in that order.
@derekcicerone can you comment on whether this seems reasonable?
from plottable.
Although we can always take the simpler approach - just implement the proposal above to check whether the d.t.s interface changed - in most cases we won't change the typing so it won't trigger the recompile of test or examples, so we get 3s compile is most cases and 9s compile only in the case where we modify the plottable API.
from plottable.
I think you should use the concatenation support built into the TypeScript compiler. It already handles ordering of the files.
If you stick with the current tooling, consider breaking up the watch task into 3 separate targets if possible. Then each one will only run if necessary.
Beyond that I don't have much advice because I would solve this via IDE support - not Grunt.
from plottable.
Related Issues (20)
- Gridlines don't line up when using useUTC flag
- Exception in Utils.Translator.isEventInside(component, event) when component is a group
- Using Angular and chart.renderTo HOT 2
- Rectangle Plot Error: postScale is not a function (replicated in codesandbox) HOT 2
- Radar Chart on Plottable
- Area plot autorangeMode not working
- angular
- FR: EventFilter for DragInteraction?
- Scrambled stacked bar chart if a data point is below Y domainMin or total is above domainMax
- Yarn Build is broken? HOT 1
- Plot boundaries HOT 2
- Mouse event handling broken by new Chrome Release
- Unable to align the text of a GuideLineLayer to anything other than left
- Is Plottable actively developed? HOT 3
- Tooltips tutorial demos don't work HOT 3
- Support for 24 hour time format HOT 2
- Tooltip offset on Mobile Mode HOT 1
- Is plottable still maintained ? HOT 5
- Migrate to lodash-es HOT 1
- clustered bar rendering labels only after branch change
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 plottable.