Base64 Conversions and CPU Usage

G

Guest

I'm reading a bytes of jpg file and convert them to Base64 string using
Sender Side : Convert.ToBase64String();
in Reciever Side : i get back the string to bytes i write it to file (i
convert the string to bytes using Convert.FromBase64String())

the CPU usage when Convert.FromBase64String() the CPU usage be within
80%~100% ,so i wondering are there more efficient ways to to such task?
 
T

Tim_Mac

hi Raed,
is that via a web service?
if so, you can send the bytes as a parameter (byte[]) to the web method, no
need to convert to and from a string.
or, if you want even better performance, you can look into using the Web
Service Enhancements (WSE) and send the file as a Dime attachment, which is
sent as raw binary attachment with a web method. (even the byte[] in a
normal web method gets serialised with XML, so lots of padding and
processing there still). there are webservices and webServiceEnhancements
newsgroups if that's the route you are going, which will help should you
have further questions.

hope this helps
tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

base64 5
control CPU usage 8
CPU Usage going 100% 1
JavaMail and base64 problem 7
Some Basics - strings and Conversions 7
memory and CPU resourses problem 0
poplib 100% cpu usage 0
Inconsistent CPU usage 16

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top