473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Which operation would cost more?

Consider the following:

I have a socket server that converts the incoming data to astring. Each reception of data is to be stored in a new row ofa dataset.

Is it cheaper (in the sense of system resources) to storeeverything into a single string, pass the string back to mymain(), perform string manipulation, and add the data to thedataset accordingly. -OR- pass the dataset obj to my TCPServer,add rows of data to the dataset as data comes in, and then passthe modified dataset back to main. The concactanated stringsfrom the first method would never exceed much more than a couplehundred characters. The dataset would be dynamic and couldreach upwards of 10K characters (plus all the overhead in adataset).
User submitted from AEWNET (http://www.aewnet.com/)
Nov 16 '05 #1
1 1247
To begin with, in order to pass a DataSet over the wire as a stream of bytes
over tcp, you would have to use a custom serializer or a serializer
surrogate class such as Ravinder Vuppula's DataSetSurrogate, otherwise
converting the class instance to bytes would involve a high amount of XML,
since that's the way the .NET 1.1 DataSet describes itself to the
serialization framework.

So my take is that it would be better to handle the row-by row data as a
string. Even better is if you dont' convert it to a string at all, since
most string - related operations are not very performant from a CLR point of
view.
--Peter
<@aew_nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Consider the following:

I have a socket server that converts the incoming data to a string. Each
reception of data is to be stored in a new row of a dataset.

Is it cheaper (in the sense of system resources) to store everything into a
single string, pass the string back to my main(), perform string
manipulation, and add the data to the dataset accordingly. -OR- pass the
dataset obj to my TCPServer, add rows of data to the dataset as data comes
in, and then pass the modified dataset back to main. The concactanated
strings from the first method would never exceed much more than a couple
hundred characters. The dataset would be dynamic and could reach upwards of
10K characters (plus all the overhead in a dataset).
User submitted from AEWNET (http://www.aewnet.com/)
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marcus | last post by:
Hi I have a very complex sql query and a explain plan. I found there is a full table scan in ID=9 9 8 TABLE ACCESS (FULL) OF 'F_LOTTXNHIST' (Cost=84573 Card=185892...
5
by: zaemin | last post by:
From a web-site that teaches optimization for c, I saw bellow optimization rule. int fact1_func (int n) { int i, fact = 1; for (i = 1; i <= n; i++) fact *= i; return (fact);
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
20
by: mike3 | last post by:
Hi. (Xposted to both comp.lang.c++ and comp.programming since I've got questions related to both C++ language and general programming) I've got the following C++ code. The first routine runs in...
50
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.