inserting media into blobs is slow

Hi all…

I have a servoy solution which my customer is about to start using much more for images of their work. They have been storing small-ish jpgs in their solution and it has worked very well so far. We are attaching their solution to a website which is going to be selling high res images which are stored in the Servoy solution and sent over to a mysql database each time they are “added to web”. I was telling them that there would be no problem storing big pictures in Servoy and everything should be no problem etc…

Then they started putting 60MB tiffs into Servoy and it has effectively croaked. It will take 20 minutes to add the file to the blob field which effectively hangs Servoy (client) during the process. In many cases they have just assumed it has crashed and quit it. We have had an emergency rethink about the process and effect and have decided to use smaller files (300dpi, 5MB (on disk) jpgs). This has improved things a lot but it still takes almost a minute to insert the pictures.

Question is, should Servoy be this slow when inserting media into blobs (even on a local machine - in developer) and if not, what am I doing wrong?? this is my code to add the image:
controller.newRecord(true)
var file = application.showFileOpenDialog()
image = application.readFile(file)
createThumbnail()

Machine is a 2.16Ghz intel core duo Macbook Pro among others. Server is a 2.0Ghz DP G5 Powermac with OS X 10.4.8 server. Java is latest Java on OS X (build 1.5.0_06-112)

I’d be grateful for any solutions or an idea of how long it should take.

Take a look at Marcel’s (it2be) site. He recently acquired the Cybersack plugins and there should be one that allows you to stream a file to the DB without leaving the user waiting. I think that’s what you need here…

Thanks for the referral Patrick!

And, yes, the solution could be the data stream plug-in with if needed/of additional use the image bean and the media manager bean.

Using the data stream plug-in takes care of:

  • occuring memory issues;
  • occuring GUI freezes
  • if you want, progress bars showing progress with the option to cancel.

Take a look here: Servoy Components – Plugins, Beans, Web Components, Angular Services & Servoy Developer Consulting