Я не уверен, что это лучший способ, но он должен работать. Поместите это в функцию фокусировки:
var fv = $('#myform').validate();
// setTimeout is needed to let validation to complete
var currentElement = this;
setTimeout(function() {
let error = fv.errorList.filter(function (e) { return e.element == currentElement; })[0];
console.log(error.message);
});
We also have huge solutions. Build and compilation is all about I/O.
Solid-state drives are very promising. A co-worker put a solid-state drive in his laptop, and found that it is now much faster than his humongous main development box. Don't have the details, but he claims many times faster.
We've been fiddling with solution folders to group parts of the project: This makes it easier for devs to unload projects they aren't working on.
/m
rarely helps with .NET debug builds. I ran a series of tests on this a few weeks ago and found minor differences. Findings:
Big picture: In reality, compilation is a pretty minor cost for me, compared to getting source and running unit tests. On our build server, the integration tests and packaging are almost all the time. For my development box, I schedule a batch file that gets source, builds, runs unit tests before I come to work and while I'm at lunch. Good enough.
On the build server, it's more complicated. We're thinking of setting up chained parallel CruiseControl.NET builds on various machines. We are using VSTS build, but it is too expensive (and time consuming) to scale horizontally like this.
My numbers for detail-oriented folks. Configurations from slowest to fastest, running msbuild "bigsolution.sln" /target:clean - between each.
Build time without rebuild or clean: ~ 4-10 seconds
Время сборки MSBuild - многомерная проблема. Хорошая новость в том, что это легко решить:
В отличие от большинства процессов, запущенных на машине сборки, процессы сборки печально известны тем, что потребляют ресурсы ЦП, ОЗУ и ввода-вывода. Общий рецепт для ускорения сборки MSBuild - «получить лучшую машину, которую можно купить за деньги», в частности:
ЦП - не менее двух Intel 3.0 ГГц Core 2 Duo.
ОЗУ - не менее 4 ГБ DDR3. Если это машина для разработчиков и , то лучшим вариантом будет 64-разрядная ОС и 8 ГБ ОЗУ.
Жесткий диск. Самым быстрым вариантом является высокопроизводительный 3ware RAID-1 с включенным аккумулятор платы и включенный кэш записи. Другой вариант, который стоит рассмотреть, - быстрый SSD.
Сеть - карта минимум 1 Гбит / с.
Эта простая аппаратная оптимизация может ускорить ваши сборки MSBuild в 2-3 раза.