c# - Visual Studio becomes laggy and freezes with too much parallel loops -
we found strange issue in visual studio.
if put more 6 or maybe more parallel loops each other, visual studio becomes laggy.
if click loop, , try scroll, or try click outside of loops, click loop again, vs freezes 5-10 secs. simple loops problem never occurs, think problem that, in case of parallel loops have actions, , maybe kills ide.
we have tested both vs2012 , vs2013 , it's same.
here example:
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace consoleapplication1 { class program { static list<string> _list = new list<string>(); static void main(string[] args) { parallel.foreach(_list, element1 => { parallel.foreach(_list, element2 => { parallel.foreach(_list, element3 => { parallel.foreach(_list, element4 => { parallel.foreach(_list, element5 => { parallel.foreach(_list, element6 => { parallel.foreach(_list, element7 => { }); }); }); }); }); }); }); } } }
if had similar problems, , know solution, please answer!
Comments
Post a Comment