473,666 Members | 2,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perfomance Query

I'm working on a project which contains a web interface file browser.
Currently the files can be hidden or shown (based upon file name or
extension type) through a hardcoded series of 'if' and 'switch'
statements.
I'm moving this over to an xml file which will be cached and loaded at
application start and have come up with two possible ways of doing
this:

a) Load the file into a datatable and then for each file object found
in a directory, loop through the datatable to see if that file should
be shown or hidden.

b) create a value object dictionary with the key being the file or
extension name and then a struct, containing things like image (to
attach to file type) and alt/title text (for the image etc), being
stored along with the key. Then simply feeding each name of file
object into the Dictionary and pulling out the corresponding struct
and relevant information.

Which of these would be best performance wise? The first would
generate large amounts of looping, and the second would perhaps have a
performance hit from converting the objects in the dictionary back to
structs.

Or is there a better way of doing this?

Jun 27 '08 #1
0 685

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

Similar topics

2
5093
by: news.onet.pl | last post by:
I've launched some perfomance test for some program measuring number of operations, net messages processed per second, etc. Why is my point, is the question how Java initial and maximal heap is connected with the swap space of Operating System. Those Java utilize both memory and swap space for purpose of its heap? TIA,
8
2266
by: Paulo Jan | last post by:
Hi all: I have here a table with the following schema: Table "todocinetv" Column | Type | Modifiers -------------+-----------------------------+---------------------- id | integer | not null default '0' datestamp | timestamp without time zone | not null thread | integer | not null default '0'
2
1020
by: Laurence Breeze | last post by:
I look after a database which is part of a third party CRM product. The users of the product complain of intermittant poor performance, the suspicion is that some more senior users are running their own queries (the product allows users to do this). I've been asked by the development team to try to capture the details of long running queries. I've looked at the events listed in profiler and can't see one that would be useful. Ideally...
4
1548
by: =?Utf-8?B?VmVlcmFiaGFkcmFpYWggTCBN?= | last post by:
Hi, I have two databases D1 with 6 million records and D2 with 95 thousand records. I need to check Common records from these two databases based on UserID and need to insert into other database D3 and also need to create XML files. For this i followed below approach. I have used two threads. -->one thread to Pick the users from D1, filter out against D2 and will be inserting into D3.
0
1189
by: ferozanna | last post by:
I am using Asp.net 1.3 with C# My application used by call center people My applicaton is a three tier arch I have create data layer as class ibrary which goint to talke Ssqlserver 205 db At time 2000 to 3000 user are using How can i improve my application perfomance, Give me tips
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.