Improve Deserialize Speeds Of A Large Dictionary?

Feb 2, 2010

it's capability to serialize objects. In a future project I will be creating dictionaries which have a Long as a key and a Collection as an item (itself containing two other long values). These dictionaries will be large, containing around 300,000 entries.

I've worked out how serialize and deserialize the dictionary using a binary formatter.

To serialize I use:

Dim myDictionary As Collections.Generic.Dictionary(Of Int64, Collection))
' I fill the dictionary with 300,000 entries here
Dim fs As New FileStream("c: empserialDict.dat", FileMode.Create)

[Code]....

View 3 Replies


ADVERTISEMENT

TCP Client Connection Speeds

Dec 19, 2011

Is there a simple reason why it takes a long time to connect to a server? Take mIRC and xChat for example. Seems to instantly connect.

View 6 Replies

VS 2008 Can Change Timer Speeds

Oct 27, 2011

I have a timer1 and it's interval is set to (1000). I know i can change the speed in a button or something like this:"Timer1.Interval = (2000)" but is it possible to make it so it RANDOMLY changes? Like when the timer1 is ticking, maybee it will change every time to somewhere between 200-1000 ? So its not EXACTLY a preset exact time interval.

View 2 Replies

VS 2010 Detecting CPU, GPU, HDD Temps, Fan Speeds?

Mar 1, 2011

I'm wondering how I would go about getting CPU, GPU and HDD temperatures and fan speeds, is there an easy API for this? I have a feeling there isn't

View 6 Replies

Flicker Free Listview / Add A Row At Slow Speeds

Jun 1, 2005

I'm using a listview control as a log window for a self-made FTP client application.Sometimes I need to add a row at slow speeds, but also sometimes a lot of information (50-100 rows, like dirlistings, login messages of FTP servers) has to be added to the listview within a For/Next loop.Now adding rows very quickly makes the listview flicker in an ennoying way. So much, the listview is hardly to read.For me, it is important I can see every row added (using different colors to know different meanings).Searching the internet, I find solutions using BeginUpdate & Endupdate of the listview control just outside the bounds of the For/Next loop. This makes that the new rows are displayed only when the For/Next loop is complete.Does anyone know a solution to significant reduce the flickering (maybe without using BeginUpdate & EndUpdate?), but where I still can see every single row added?

View 21 Replies

VB 2008 Make A Website Refresher With Intervals / Speeds

Sep 5, 2009

This is How to make a website refresher with intervals/speeds

[Code]...

View 2 Replies

Use Linq ToDictionary To Return A Dictionary With Multiple Values In The Dictionary Items?

Jan 25, 2010

I want to group items from a linq query under a header, so that for each header I have a list of objects that match the header title. I assumed the solution would be to use ToDictionary to convert the objects, but this allows only one object per "group" (or dictionary key). I assumed I could create the dictionary of type (String, List Of()), but I can't figure out how to write it. As an example I have written a simplified version below.

[Code]...

View 2 Replies

Dictionary In A Dictionary - Collection Of Data To Pass Back ?

Apr 27, 2009

I have created a class with a function in it. I have a collection of data I want to pass back. I tried an arraylist first. Now I am trying to use a dictionary. My problem is that it creates the dictionary ok, but I am only get the last row of data from my

Function GetWeldAuditInfo(ByVal ResourceId
As
String,
ByVal VendorId

[CODE].........................

View 2 Replies

Flatten A Dictionary Of Dictionaries And Sum The Values Of The Inner Dictionary With LINQ?

Apr 16, 2012

I have the following object:

countDictionary As Dictionary(of Category, Dictionary(of Date, Integer))

The Class has a Enumeration Property. For the purposes of demonstration, I'll call it MasterCategory.I have been trying to get out an object that looks like the following:

groupedCountDictionary As Dictionary(of MasterCategory, Dictionary(of Date, Integer)

The best result I could get was:

Lookup(of MasterCategory, Dictionary(of Date, Integer))

From:

countDictionary.ToLookup(Function(o) o.Key.MasterCategory, Function(o) o.Value)

Which results in a IEnumerable (Of Dictionary(of Date, Integer)) for each MasterCategory value.However, I need that IEnumerable of Dictionary flattened to one dictionary with all the integers summed (total counts) for each date. I then tried to use various selects and group bys (from numerous stackoverflow posts) to "flatten" it, but my efforts have fallen short.

Current Code

[Category Class]
- MasterCategory As Enum
- Name As String etc

[code]....

View 1 Replies

Large Multidimensial Array - Write A Program To Do Markov Chain But States Are Quite Large

Jun 9, 2011

I want to write a program to do Markov chain, but my states are quite large. First of all I calculate all the transition probabilities and revenues for all states(1381860 total states), and store in a multidimensional array. Public RevArr(0 To 9, 0 To 750, 0 To 282) As Long

After that the iteration of markov chain should use these as inputs to calculate the steady-state probabilities. But when I try to run the main code I got this error.Exception of type 'System.OutOfMemoryException' was thrown.

The following is the declaration of second array I add just another dimension for storing all the iterations, but I get this error. Dim stateprob(IT + 1, 0 To 9, 0 To 750, 0 To 282) As single

View 1 Replies

.net - Filter Custom Dictionary With LINQ ToDictionary - "Unable To Cast Object Of Type 'System.Collections.Generic.Dictionary`2"

Jul 7, 2010

I have created a Dictionary class (MyDictionary for the example). I am currently trying to pass MyDictionary into a function, filter it into a new instance of MyDictionary and pass this new instance into another method. When I am attempting to create the second instance from the filtered first instance of MyDictionary via Lambda Expressions and the ToDictionary Method, I am getting the following error:

Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.Int32,System.String]' to type 'MyDictionary'. I have simplified the example and recreated it in LINQPad and am getting the same error.

Here's the simplified version of my code:

[Code]...

View 2 Replies

Dictionary In Particular The Dictionary.ContainsKey Method

Jan 6, 2011

I use VS2005 and I have just started working with the dictionary in particular the Dictionary.ContainsKey method. At the bottom of the page in the msdn library it says the following in the community content How to make sure that Contains functions properly.

View 3 Replies

How To Improve My Coding

May 28, 2011

Whenever i work on form, so i use this code

CODE:

Now i have 2 things to ask?

1) is this right way which i use?

2) I use the same on every form regardless on number of forms? is it fine to use it on every form?

View 3 Replies

VS 2005 How To Improve This

May 28, 2011

whenever i work on form, so i use this code,[code...]

now i have 2 things to ask?

1) is this right way which i use?

2) I use the same on every form regardless on number of forms? is it fine to use it on every form?

View 2 Replies

C# - Will Learning WPF Improve Skills In ASP

Dec 2, 2010

I have worked in Windows Forms for years, and still do. I'm not acquainted at all with the ASP.NET technology and no other Web related technology. I have worked with:

Oracle Form Builder;
Visual dBase 7.5;
Delphi 2.0, 3.0 and 7.0;
Sybase Power Builder 10.5;
Visual Basic 6;
Visual Basic 2003/2005/2008;
And ultimately, Visual C# 2005/2008.

I'm mostly a C# programmer with a growing experience in VB.NET for the current year. What would be the way to go to learn WPF the best possible way while taking into account my experience? And I'd like to know, will learning WPF improve my skills in ASP.NET and the like?

View 4 Replies

Improve Reading Of A File

Feb 12, 2012

I read a text file every second..[code]The file is generated from another program and it's costantly updated more times per second.The sense of the code (StartIndex) is to read only the rows that I have not read from the last time.The code works without problems until the file is about 2.5 Mb in dimensions... for higher dimensions I have problems and all becomes very slow.Using and fs.Dispose() are like Microsoft suggest (and in fact if i run the code analisys I have no problems), but surely the problem is not here.The question is: is my code right or there is way to improve the reading?? Is there way to read only the tail without to open the whole file?

View 5 Replies

Improve The UI Of Xtrareport From Runtime?

Mar 31, 2010

I am having a problem in paging for XtraReports. How can I improve the report paging from runtime and also I would like to initialize the reportviewer from pageload.We are designing the reports from runtime , so the data on multiple pages is not working i mean I am not comfortable with it. I woulld like to do paging and limit the number of records on the page from runtime.for example i would like to add a PageInfo component and add a "Go to page no.." like this.

View 1 Replies

Looking On Input For Areas To Improve?

Jul 21, 2011

I'm currently in a programing class for vb.net. It's my first true exposure to OOP and I'm looking for some advice on areas where I could improve. I was wondering if someone would be willing to look at one of my programs that I have written and offer advice on areas where I can improve and things that I made much more complicated than they need to be. I'm not looking for a line by line critique just a general look at things to improve upon in the future.

View 2 Replies

Should Use View To Improve Performance

Mar 9, 2010

i'm developing vb.net application. There are 10 ways of transactions. I want to produce 'Purchase register report'. For that I want to find what amount of effect has been made by each transaction on ledgers of 'Purchase account'. Purchase account has almost 30 ledgers. And transactions can produce about 10000 rows in database for a year. Now if I produce month wise report for a year, there will be 10000*30=300000 row scanning which makes it very slow in execution.

View 6 Replies

VS 2005 Improve The Look Of Program?

Jan 27, 2011

I'm currently writing a football management game (Australian football) and would like to pretty it up a bit. The match engine simulates each player as a small circle, much like the old Championship Manager games. While I'm fine with this style, I'd like to improve the look. I'm just using the simple graphics tools in VB to draw circles and the oval in the background which they play on. They move around using a timer. It just doesn't look very good. The movement isn't smooth and the circles look jaggy and unprofessional. Given that I'd ultimately like to release this product, I want to make it look a lot better.

What are some 2D graphics engines that I should look at? I don't need fancy animations or anything, just some nice smooth movement and nice looking circles. Doesn't seem like I'm asking for much does it? It'd be also nice if I could add in a chrome-like look or something along those lines.

As for the menus and such, well, they are currently just the boring grey VB style. That's fine for now but, as mentioned earlier, I want to release this game at some point. How can I change all of the menus and such so that this doesn't look like a game made in visual basic...basically. I've seen skins before but I'm not really interested in giving my game some generic style. I want to be able to customize all of it for myself. I just don't know how to! Simply fiddling with the colours and fonts of the default VB controls isn't enough.

View 9 Replies

.net - Improve Coding With List Intersect Using Net 3.5?

Jan 15, 2009

I've a class that has a list of IDs with a function for adding new IDs from a list of objects.I've got this resolved, but I'm sure this can be done with much less code.Public Class Page

Private _IdList As List(Of Integer)
Private _HasNewItems As Boolean = False
Public Sub AddItems(ByVal Items As List(Of Item))
Dim itemsID = From itemX In Items _
Select itemX.ID

[Code]...

View 3 Replies

C#/.NET: How To Improve Anti-alias Quality

Aug 16, 2011

In Reporting Service, I need to have a vertical, starting at bottom, bottom-to-top, horizontally middle aligned text.The only way to do this is to create an image in code, and set this image into the title column.See the code below.Basically, it works fine, just that the anti-alias quality is pretty crappy.Is there anything I can do to improve it ?The vertical text is somehow pale, and not full black, and also there is smearing all around the text, in the background color.As well as it appears bolder than the text on the left, but both have format arial, size 8, bold I've tried all other values of System.Drawing.Text.TextRenderingHint.*, as well as no anti-alias at all but the current one seems to be the least crappy.I've also tried to change the image format, to no avail:

Function LoadImage2(ByVal sImageText As String, ByVal sImageTextMax As String) As System.Drawing.Image
sImageTextMax = sImageTextMax.PadRight(15)
Dim iFontSize As Integer = 8 '//Change this as needed

[code]....

View 3 Replies

How To Improve Performance Of App By Error Catching

Mar 7, 2009

I'm trying to improve my app with some error catching. I have a module that downloads a file from the Internet to a local folder. At the moment, if the local folder doesn't exist, it just crashes here:

strLocalFile = New FileStream(pPath, FileMode.Create, FileAccess.Write, FileShare.None)
with error:
System.IO.DirectoryNotFoundException was unhandled
Message="Could not find a part of the path 'C:Documents and SettingsSimonDesktop estdownload.zip'."
Source="mscorlib"

How can I do something with that error and stop my app from crashing? Ideally, have a messagebox show saying 'directory not found' or similar.

View 5 Replies

How To Improve Reading Performance From A Datatable

Oct 25, 2010

i have a datatable with about 10000 rows and few columns (4)I have noticed that the process of reading a big table its quite slow..is there a way to improve performance in reading a datatable?

View 15 Replies

Improve On The Inserting Of Data String?

Sep 23, 2009

I am doing a project of inserting the data into the database through the used of textbox. I am using 5 textboxes when I run the application. The application is working fine but the problems is that when I post this codes, there is answer that I have to modify the inserting part to make it better. Is there any other way to make it better for the part when I am inserting the data? The program that I am using to make this application is visual studios 2005 and sql server 2005 for the database.

Imports
System.Windows.Forms
Imports
System.Data.SqlClient

[code]....

View 4 Replies

Improve Perfomance Creating DataTable?

Feb 20, 2012

I have following code and it's slow to load first time. CSV file is about 4mb 16000 rows.

If Session("tb") Is Nothing Then
Dim str As String()
If (IsNothing(Cache("csvdata"))) Then

[Code].....

View 1 Replies

Improve TcpClient Connection Speed?

Jan 31, 2012

I am writing a VB.NET app that connects to a legacy application using TCP.

The communication is working fine and is very quick once connected, but there is always a delay (of around 2.5-3.5 seconds) when I create the new connection even though I am connecting to my local machine[code]...

View 2 Replies

VS 2008 Improve On Block Of Code?

Jun 13, 2009

I have this block of code that splits txt/csv files. It is working just fine but its a but "ghetto"

[Code]...

View 2 Replies

VS 2008 Improve Search Speed

Jul 29, 2009

I have an application in VS (vb) with a database in Access 2007. In the application I have some search functions. They were running very slow until recently when I played around with access andthe indexes. I found that made great improvement in speed. But as the application is running the speed of the searc function diminishes.how to improve speed of the search function and make my database provide faster results.

View 6 Replies

How To Deserialize AMF In VB

Dec 17, 2010

I can't find any example about how to deserialize AMF in vb.net. I found one in C# but i don't know how to make it working for VB. Someone is able to show me an example of parsing AMF, simple client?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved