Loading toolbar states, taking long time
Hi,
Previously with syncfusion version 5.1.1.47, I used SaveBarState() and LoadBarState() methods to save into database and load from the database the toolbar states.
Here is the code snippet I have used:
private void SaveToolbarState()
{
MemoryStream memoryStream = new MemoryStream();
// save the customized data into the stream
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.SaveBarCustomization(serializer);
mainFrameBarManager.SaveBarState(serializer); // here I am getting Object refference not set to an instance exception.
serializer.PersistNow();
}
private void LoadToolbarState()
{
// get the byte array from backend
MemoryStream memoryStream = new MemoryStream(buff, 0, buff.Length);
memoryStream.Seek(0, SeekOrigin.Begin);
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.LoadBarCustomization(serializer);
mainFrameBarManager.LoadBarState(serializer);
}
Now I upgraded into syncfusion version 6.4.0.15. After upgrading, the following problems has raised.
1) In SaveToolbarState() method, at this line mainFrameBarManager.SaveBarState(serializer) I am getting "Object refference not set to an instance" exception.
Why this exception has raised?
2) If I use another approach to save toolbar states into XML file and load from XML file, as attached file
(or)
to save toolbar states into windows regestry load from windows registry, as attached file.
If I run my application more than 6 or more times it is taking long time to load toolbar states.
Why it is taking long time to load toolbar states?
How can I reduce the time to load toolbar states?
Please run attached samples, you will understood clearly.
Repeat it more than 10 times, each time your will find it will increate the time to load toolbar states.
Thanks & Regards
-Kishan
ToolBarStates_cdd03c12.zip
Previously with syncfusion version 5.1.1.47, I used SaveBarState() and LoadBarState() methods to save into database and load from the database the toolbar states.
Here is the code snippet I have used:
private void SaveToolbarState()
{
MemoryStream memoryStream = new MemoryStream();
// save the customized data into the stream
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.SaveBarCustomization(serializer);
mainFrameBarManager.SaveBarState(serializer); // here I am getting Object refference not set to an instance exception.
serializer.PersistNow();
}
private void LoadToolbarState()
{
// get the byte array from backend
MemoryStream memoryStream = new MemoryStream(buff, 0, buff.Length);
memoryStream.Seek(0, SeekOrigin.Begin);
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.LoadBarCustomization(serializer);
mainFrameBarManager.LoadBarState(serializer);
}
Now I upgraded into syncfusion version 6.4.0.15. After upgrading, the following problems has raised.
1) In SaveToolbarState() method, at this line mainFrameBarManager.SaveBarState(serializer) I am getting "Object refference not set to an instance" exception.
Why this exception has raised?
2) If I use another approach to save toolbar states into XML file and load from XML file, as attached file
(or)
to save toolbar states into windows regestry load from windows registry, as attached file.
If I run my application more than 6 or more times it is taking long time to load toolbar states.
Why it is taking long time to load toolbar states?
How can I reduce the time to load toolbar states?
Please run attached samples, you will understood clearly.
Repeat it more than 10 times, each time your will find it will increate the time to load toolbar states.
Thanks & Regards
-Kishan
ToolBarStates_cdd03c12.zip
SIGN IN To post a reply.
3 Replies
HK
Hemaladha K
Syncfusion Team
December 11, 2008 12:06 PM UTC
Hi Kishan,
Thank you for your interest in Syncfusion Products.
1. "Object reference not set to an instance" exception throws in SaveToolBarState() method.
I am afraid that I was not able to reproduce the reported issue, please refer to the below sample which I have tested the issue.
http://websamples.syncfusion.com/samples/Tools.Windows/F78346/Tools_WF_SaveState.zip
2. Form takes long time to load when load the toolbar state.
We suspect this issue to be a defect and we have forwarded this to our development team for more analysis. We will get back to you on 15th December, 2008 with more details.
Please let me know if any concerns.
Regards,
Hema
Thank you for your interest in Syncfusion Products.
1. "Object reference not set to an instance" exception throws in SaveToolBarState() method.
I am afraid that I was not able to reproduce the reported issue, please refer to the below sample which I have tested the issue.
http://websamples.syncfusion.com/samples/Tools.Windows/F78346/Tools_WF_SaveState.zip
2. Form takes long time to load when load the toolbar state.
We suspect this issue to be a defect and we have forwarded this to our development team for more analysis. We will get back to you on 15th December, 2008 with more details.
Please let me know if any concerns.
Regards,
Hema
AD
Administrator
Syncfusion Team
December 11, 2008 12:53 PM UTC
Hi Hema,
Thanks for reply.
For the first point, I already kept that code in try, catch block. So that your not able to reproduce the exception.
Please run attached .cs file you will get exception.
Please help me, how to avoid that exception?
Thanks
-Kishan
Tools_WF_SaveState_b3237560.zip
Thanks for reply.
For the first point, I already kept that code in try, catch block. So that your not able to reproduce the exception.
Please run attached .cs file you will get exception.
Please help me, how to avoid that exception?
Thanks
-Kishan
Tools_WF_SaveState_b3237560.zip
HK
Hemaladha K
Syncfusion Team
December 12, 2008 09:43 AM UTC
Hi Kishan,
Thank you for your update.
Please followup the incident 52074 for more details regarding this issue.
Please let me know if any concerns.
Regards,
Hema
Thank you for your update.
Please followup the incident 52074 for more details regarding this issue.
Please let me know if any concerns.
Regards,
Hema
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AD Administrator
- Dec 10, 2008 05:09 AM UTC
- Dec 12, 2008 09:43 AM UTC