Last active
April 23, 2022 13:32
-
-
Save jinjor/e71b1e224552524b38760ab6783bdf74 to your computer and use it in GitHub Desktop.
elm-make one by one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure every time only one file is re-compiled | |
echo "time\t\tlines\timports\tfile" | |
for f in `find src -name *.elm` | |
do | |
elm-make $f --output=/dev/null > /dev/null | |
sleep 1 | |
touch $f | |
a=`wc -l $f | awk '{print $1}'` | |
b=`cat $f | grep -e "^import " -c` | |
c=`{ time elm-make $f --output=/dev/null ; } 2>&1 | grep real | awk '{print $2}'` | |
echo "$c\t$a\t$b\t$f" | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time lines imports file | |
0m2.515s 2632 46 src/elm/Page/Map/Update.elm | |
0m1.553s 18 6 src/elm/Page/Map/Main.elm | |
0m1.389s 718 34 src/elm/Page/Map/CanvasView.elm | |
0m1.279s 293 35 src/elm/Page/Map/View.elm | |
0m1.168s 549 34 src/elm/Page/Map/Model.elm | |
0m1.013s 86 11 src/elm/Page/Map/ContextMenu.elm | |
0m1.006s 184 13 src/elm/Page/Map/PropertyView.elm | |
0m0.987s 191 20 src/elm/Page/Map/SearchResultView.elm | |
0m0.977s 50 6 src/elm/Page/Map/GridLayer.elm | |
0m0.975s 60 11 src/elm/Page/Map/FloorUpdateInfoView.elm | |
0m0.918s 170 15 src/elm/Page/Master/View.elm | |
0m0.899s 410 16 src/elm/View/ObjectView.elm | |
0m0.870s 341 13 src/elm/Page/Map/ObjectNameInput.elm | |
0m0.833s 859 7 src/elm/Page/Map/Emoji.elm | |
0m0.818s 23 5 src/elm/Page/Master/Main.elm | |
0m0.782s 190 13 src/elm/Page/Map/ProfilePopup.elm | |
0m0.775s 639 17 src/elm/API/Serialization.elm | |
0m0.774s 85 10 src/elm/Page/Map/PrototypePreviewView.elm | |
0m0.766s 147 26 src/elm/Page/Map/Msg.elm | |
0m0.765s 176 12 src/elm/Page/Map/FloorsInfoView.elm | |
0m0.750s 68 9 src/elm/View/PrototypePreviewView.elm | |
0m0.747s 88 8 src/elm/Page/Map/PrintGuide.elm | |
0m0.743s 149 4 src/elm/Page/Map/KeyOperation.elm | |
0m0.737s 245 16 src/elm/Page/Master/Update.elm | |
0m0.717s 1076 4 src/elm/View/Styles.elm | |
0m0.678s 192 15 src/elm/View/DiffView.elm | |
0m0.661s 22 7 src/elm/Page/Master/Model.elm | |
0m0.652s 183 11 src/elm/Page/Login/Main.elm | |
0m0.650s 316 16 src/elm/API/API.elm | |
0m0.645s 183 11 src/elm/Model/ClipboardData.elm | |
0m0.639s 284 11 src/elm/Component/FloorProperty.elm | |
0m0.618s 417 7 src/elm/Model/Floor.elm | |
0m0.601s 62 6 src/elm/Page/Map/MessageBar.elm | |
0m0.601s 59 4 src/elm/Model/SaveRequest.elm | |
0m0.594s 138 4 src/elm/Model/EditingFloor.elm | |
0m0.580s 87 10 src/elm/Component/FloorDeleter.elm | |
0m0.578s 504 2 src/elm/Model/ObjectsOperation.elm | |
0m0.570s 124 2 src/elm/Page/Master/PrototypeForm.elm | |
0m0.564s 16 3 src/elm/Model/Information.elm | |
0m0.561s 275 10 src/elm/Component/Header.elm | |
0m0.560s 149 5 src/elm/Model/FloorDiff.elm | |
0m0.555s 194 2 src/elm/View/CommonStyles.elm | |
0m0.554s 33 4 src/elm/View/HeaderView.elm | |
0m0.547s 24 8 src/elm/Page/Master/Msg.elm | |
0m0.543s 30 4 src/elm/View/DialogView.elm | |
0m0.542s 582 0 src/elm/Model/I18n.elm | |
0m0.534s 164 3 src/elm/View/Icons.elm | |
0m0.530s 365 2 src/elm/Model/Object.elm | |
0m0.529s 48 4 src/elm/View/Common.elm | |
0m0.529s 140 3 src/elm/Model/FloorInfo.elm | |
0m0.520s 216 4 src/elm/Model/Prototypes.elm | |
0m0.520s 205 7 src/elm/Util/HtmlUtil.elm | |
0m0.507s 156 6 src/elm/Util/HttpUtil.elm | |
0m0.506s 154 7 src/elm/Page/Map/SearchResultItemView.elm | |
0m0.504s 13 1 src/elm/Page/Master/Styles.elm | |
0m0.497s 88 3 src/elm/Model/ProfilePopupLogic.elm | |
0m0.497s 147 4 src/elm/Model/SearchResult.elm | |
0m0.495s 101 5 src/elm/Page/Map/ClipboardOptionsView.elm | |
0m0.493s 18 2 src/elm/Util/DecodeUtil.elm | |
0m0.493s 110 7 src/elm/API/Cache.elm | |
0m0.492s 39 6 src/elm/View/SearchInputView.elm | |
0m0.492s 35 0 src/elm/Util/StyleUtil.elm | |
0m0.491s 38 6 src/elm/Component/ImageLoader.elm | |
0m0.488s 65 0 src/elm/Util/ListUtil.elm | |
0m0.487s 99 4 src/elm/Page/Map/URL.elm | |
0m0.486s 134 0 src/elm/Model/Mode.elm | |
0m0.483s 41 3 src/elm/Util/UrlParser.elm | |
0m0.483s 35 1 src/elm/Util/IdGenerator.elm | |
0m0.482s 98 0 src/elm/Util/UndoList.elm | |
0m0.481s 112 3 src/elm/Model/ObjectsChange.elm | |
0m0.479s 25 3 src/elm/View/MessageBar.elm | |
0m0.476s 89 1 src/elm/Util/UUID.elm | |
0m0.475s 128 2 src/elm/Model/DateFormatter.elm | |
0m0.473s 85 6 src/elm/Component/Dialog.elm | |
0m0.468s 331 0 src/elm/View/Theme.elm | |
0m0.466s 66 1 src/elm/Model/ColorPalette.elm | |
0m0.465s 8 1 src/elm/Util/DictUtil.elm | |
0m0.464s 108 1 src/elm/Model/Scale.elm | |
0m0.462s 11 0 src/elm/Util/StringUtil.elm | |
0m0.461s 43 1 src/elm/Model/User.elm | |
0m0.460s 49 3 src/elm/Util/File.elm | |
0m0.459s 47 1 src/elm/Page/Login/Styles.elm | |
0m0.459s 28 1 src/elm/API/Defaults.elm | |
0m0.454s 34 4 src/elm/Page/Map/LinkCopy.elm | |
0m0.454s 16 0 src/elm/Model/Person.elm | |
0m0.453s 20 1 src/elm/Model/Prototype.elm | |
0m0.453s 16 0 src/elm/API/Page.elm | |
0m0.452s 84 1 src/elm/CoreType.elm | |
0m0.447s 8 1 src/elm/Page/Map/ContextMenuContext.elm |
Note: Why sleep 1
?
- I saw sometimes elm-make compiled more than 1 module without waiting. Not sure how long we should wait, but 1s may be enough.
- I don't know common way to sleep less than 1s. (I'm not very good at shell script)
If you find a better way, don't forget to confirm it really compiles exactly 1 module.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use MacOS too and tend to run shell script files using
sh x.sh
. That instead shows-e
in output. You are right when using bash (bash x.sh
or command directly on terminal). I'm not sure which way is more commonly used.