Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing research on file type
Message
De
14/01/2016 08:58:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Optimizing research on file type
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629800
Message ID:
01629800
Vues:
43
I have a FileType class which I am using to get the file type of a file. The goal consists of loading the file into a string and analyzing the bytes of the string to detect if a known file type is recognized.

In that FileType() method, I am loading the file into memory such as this:
				Using loStreamReader As New StreamReader(lcFile, System.Text.Encoding.Default)
					cString = loStreamReader.ReadToEnd()
				End Using
In our daily operations, we process about 4000 zip files, where each of them contains about 30 or more files, where I have to get the file type of each. So, basically, this method is called about 120000 times on a daily basis. I see this is, of course, impacted by the size of the file. So, if the file is bigger, it will take more time to do the above.

Would there be any faster way to achieve this?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform