Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Update Less to 1.7.0 #6730

Merged
merged 7 commits into from
May 13, 2014
Merged

Update Less to 1.7.0 #6730

merged 7 commits into from
May 13, 2014

Conversation

WebsiteDeveloper
Copy link
Contributor

Updating less for improvements made since 1.4.2
See https://github.com/less/less.js/blob/master/CHANGELOG.md for more detailed information.

@njx
Copy link
Contributor

njx commented Feb 10, 2014

To @redmunds. Seems like there's some potential testing risk - please assess. Also note that there's a spurious CM SHA commit in here.

@njx
Copy link
Contributor

njx commented Feb 10, 2014

Also, as a general rule, we only really want to update stuff like this if there's a major win to be had from upgrading (i.e., it fixes a major bug that affects us, has major performance gains, etc.) If none of those apply, we shouldn't upgrade now, because there's a cost in testing and potential destabilization.

@WebsiteDeveloper
Copy link
Contributor Author

I will remove the CM commit.
There is a performance improvement of about 30-40% as stated in the Changelog, this is the most notable improvement, for which i did this pull.

@@ -1 +1 @@
Subproject commit 5ccfedfb0a22a95ec6e28f7475d1bac9c349ce82
Subproject commit 5581979d2c624d6c32342e50bb417749ad799ee7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you intended to change the CodeMirror SHA, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds all fixed.

@redmunds
Copy link
Contributor

@WebsiteDeveloper On Mac, the time spent processing brackets.less dropped from 600ms to 535ms, which is >10% improvement. Nice.

But, many unnecessary messages are written to the console. Can you get rid of these?

less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_shared.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/bootstrap.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/variables.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/mixins.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/reset.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/scaffolding.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/grid.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/layouts.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/type.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/code.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/forms.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/tables.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/sprites.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/dropdowns.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/wells.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/component-animations.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/close.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/buttons.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/button-groups.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/alerts.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/navs.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/navbar.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/breadcrumbs.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/pagination.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/pager.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/modals.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/tooltip.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/popovers.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/thumbnails.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/media.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/labels-badges.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/progress-bars.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/accordion.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/carousel.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/hero-unit.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/bootstrap/utilities.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_variables.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_mixins.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_patterns_override.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_fonts.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_colors.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_theme_default.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_codemirror_override.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/jsTreeTheme.less' less-1.6.2.min.js:13
less: XHR: Getting 'file://localhost/Users/randyedmunds/github/brackets-shell/xcodebuild/Release/Brackets.app/Contents/dev/src/styles/brackets_scrollbars.less' less-1.6.2.min.js:13

@WebsiteDeveloper
Copy link
Contributor Author

We could set the logLevel of less to errors. But that would also stop showing the performance data.
I already opened a bug against the less repo to only log the preformance values less/less.js#1856

@peterflynn
Copy link
Member

@redmunds @WebsiteDeveloper Note that the speed improvement will not benefit most Brackets users -- only Brackets developers -- since the LESS is pre-compiled in release builds these days.

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds changes pushed

@@ -46,7 +46,8 @@

<!-- Pre-load third party scripts that cannot be async loaded. -->
<!-- build:js thirdparty/thirdparty.min.js -->
<script src="thirdparty/less-1.4.2.min.js"></script>
<script src="config.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not crazy about the idea of introducing a new top-level script include file just to set the logging level, and it creates an object in the global namespace. I'll have to see what the rest of the team thinks about that.

At the very least this file needs to be renamed to something more descriptive such as less-config.js and moved to the thirdparty/ folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't like the idea either but as to the object in global namespace, less does that anyway.
I also thought of changing the default value in less itself.
The reason i put this into a file is that we can't include inline scripts for chromebook deployment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be ok. Please move and rename the new file to thirdparty/less-config.js.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WebsiteDeveloper I forgot to add your id, so maybe you missed my previous comment?

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds sorry for my long response time, i have not had the time to work on this in the last few months.
I finally found the time to make this small change. So ready for another review.

@redmunds
Copy link
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request May 13, 2014
@redmunds redmunds merged commit 0e5d4ce into adobe:master May 13, 2014
@WebsiteDeveloper
Copy link
Contributor Author

Finally

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants