Answered by:
Big Design Time Performance Regression in LightSwitch V3

Question
-
After upgrading to LightSwitch V3, I got really bad performance at Design Time.
Here is the problem:
There is a Partner table, which contains 30 properties, 20 scalar properties and 5 navigation properties and 5 collection properties.
There is a partner search screen.
Now open the partner search screen, make whatever changes you'd like, the screen just hanging there for about 5 seconds. After the hang is over, anything else changes won't cause hang again.
Well, hang for 5 seconds in this scenario is acceptable for me in this scenario, but the problem is, I have a table has more than 100 properties, in the search screen or detail screen, I can't make any change because the VS is just hanging there for at lease one hour.
So, I made another test, remove all navigation properties, well, everything goes OK won't hang at all.
In lightswitch V2, I don't have any problem at all.
So, please LightSwitch Team, have time to check this problem out, why first time change anything in screen will cause a long time hang.
Sunday, April 21, 2013 2:53 PM
Answers
-
Fixed in vs2012 update 4 and vs2013 rtm.
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.
- Proposed as answer by Xpert360 Wednesday, November 27, 2013 1:14 PM
- Marked as answer by Ravi EdaMicrosoft employee, Moderator Wednesday, January 15, 2014 9:20 PM
Wednesday, November 27, 2013 1:14 PM
All replies
-
Hi, I hacked this bug by creating my own visual studio extension for lightswitch.
The core code is here:
void appExplorerService_ActiveDesignerChanged(object sender, ActiveDesignerChangedEventArgs e) { if (e.ActiveDesignerView.CurrentView.ViewContext is IScreenDesignerViewModel) { var screenDesignerViewModel = e.ActiveDesignerView.CurrentView.ViewContext as IScreenDesignerViewModel; foreach (var child in screenDesignerViewModel.ScreenMemberRootViewModel.ChildViewModels) SetState(child); } }
void SetState(IScreenMemberViewModelBase model) { var type = model.GetType(); while (type.Name != "ScreenMemberViewModelBase") type = type.BaseType; var displayNameObserver = type.GetField("displayNameObserver", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(model); if (displayNameObserver != null) { displayNameObserver.GetType().GetField("didAttributeChange", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(displayNameObserver, false); } foreach (var child in model.ChildViewModels) { SetState(child); } }
Now it's really fast, you guys really need to focus on performance, it's really bad, I'm wondering do you really have testers tested it seriously? I doubt that, sucks the performance.
I hope you guys take it seriously, I'm sicking hacking your product.
- Edited by ryan lin(China) Monday, April 22, 2013 11:57 AM
Sunday, April 21, 2013 4:23 PM -
Hi Ryan,
I hope you are still around or have you given up on LightSwitch? We are having one last try to get this problem to be taken seriously.
Performance is fine for demo apps but no good at all for real-world apps, in particular if your dare to use the new globalization/localization. So that probably excludes most USA users.
Cheers
Dave
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.
Saturday, September 21, 2013 1:25 PM -
Fixed in vs2012 update 4 and vs2013 rtm.
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.
- Proposed as answer by Xpert360 Wednesday, November 27, 2013 1:14 PM
- Marked as answer by Ravi EdaMicrosoft employee, Moderator Wednesday, January 15, 2014 9:20 PM
Wednesday, November 27, 2013 1:14 PM