EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Slow createstorage and unmount media

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#9399
Posted: 03/25/2009 05:20:00
by Adam  (Basic support level)
Joined: 03/25/2009
Posts: 7

When I first started using CBFS, the calls to CreateStorage() MountMedia() and AddMountingPoint() all executed about as quick as you could expect. Windows had a bit of a delay in showing the actual drive but this is just Windows.

However after running my application a couple of times, I notice that when I start my application, it takes it 15-30 seconds to actually start up. When I pause the debugger it shows that it is processing the fs.AddMountingPoint() call. The same thing happens when I close my application, only it is busy processing fs.DeleteStorage(). I've tried changing the order of calling the Create/Delete calls but nothing seems to happen. The sample projects execute fine without delay, but the sample is not calling all three functions back to back, there is user delay in clicking on the buttons to perform those operations. Any ideas?

Code
Code:

Form_Load(object sender, EventArgs e)
{
  fs = new CallbackFileSystem();
  //Add all event handlers
  fs.OnMount = new CbFsMountEvent(CbFsMount);
  //And so on..

  fs.CreateStorage();
  fs.MountMedia(5000);
  fs.AddMountingPointEx("T:", true);
}

Form_Closed(Object sender, EventArgs e)
{
  fs.DeleteMountingPoint("T:");
  fs.UnmountMedia(true);
  fs.DeleteStorage();
}
#9400
Posted: 03/25/2009 05:35:26
by Volodymyr Zinin (EldoS Corp.)

Hello Adam,

Thank you for the information. Please specify what versions of Windows and CallbackFS are you using?
#9401
Posted: 03/25/2009 06:06:39
by Adam  (Basic support level)
Joined: 03/25/2009
Posts: 7

Sorry this is on a WinXP Pro, with CBFS 2.1 I believe.
#9403
Posted: 03/25/2009 06:15:22
by Volodymyr Zinin (EldoS Corp.)

There is already CBFS version 2.5. Please check the problem on it. If it still exists then report us and we will explore what is wrong with it.
#9406
Posted: 03/25/2009 06:39:29
by Adam  (Basic support level)
Joined: 03/25/2009
Posts: 7

Okay, I upgraded to 2.5 and am still seeing some long delays.

I added some execution time crunching code around each of the calls

On creation of CBFS:
CreateStorage <1ms
MountMedia <1ms
AddMountingPointEx 20,000ms

On disposal:
DeleteStorage 21,310ms
UnmountMedia <1ms
DeleteMountingPointEx <1ms


These are without performing any file operations on the drive, simply running the program, creating the storage, then closing the program.
#9408
Posted: 03/25/2009 07:22:19
by Volodymyr Zinin (EldoS Corp.)

Thank you. I will check it now. You are using .NET version of CallbackFS, isn't it?
#9409
Posted: 03/25/2009 07:35:24
by Adam  (Basic support level)
Joined: 03/25/2009
Posts: 7

Yes, I am using the CBFSNet library.
#9410
Posted: 03/25/2009 08:01:00
by Volodymyr Zinin (EldoS Corp.)

Unfortunately I couldn't reproduce the problem. Could you give me your test program sources?
#9411
Posted: 03/25/2009 08:44:38
by Adam  (Basic support level)
Joined: 03/25/2009
Posts: 7

For the benefit of anyone else, I figured out the trigger for what was causing my slowdown.

Our test application is a windows AppBar with a custom wndProc to be able to process toolbar messages correctly. I'm guessing this is what is interfering with the calls to complete correctly.

I wrote a second test app that was a simple windows forms application. Copied our CBFS implementation into it, removed all of the bodies of my event handlers and the create / remove operations worked in <1000ms. So I removed all of the bodies of the event handlers in the AppBar application and still saw the slowdown. Finally I made the second test app inherit from the same AppBarForm we were using and saw the slowdown on the second test app.

Ultimately, this will not affect us, since we are probably not going to host the FS in our AppBar application anyway. We will put it in another application, or in a windows service.

Thanks for your quick feedback.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 3053 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!