I'm writing a python program that deals with a fair amount of strings/files. My problem is that I'm going to be presented with a fairly short piece of text, and I'm going to need to search it for instances of a fairly broad range of words/phrases.
I'm thinking I'll need to compile regular expressions as a way of matching these words/phr...
I have a folder named Lib and I am using the File::Find module to search that folder in whole dir say, D:\. It's taking a long time to search, say even 5 mins if the drive has a lot of subdirectories. How can I search that Lib faster so it will be done in seconds?
My code looks like this:
find( \&Lib_files, $dir);
sub Lib_files...
I recently had a rather strange phenomenon. Had to obtain a count that included joins over multiple tables with different WHERE conditions. I implemented the query first with the criteria API of hibernate. It correctly created the requested prepared SQL statement but was rather slow. Re-implemented then the entire query using HQL. Was ra...
Hi all,
How would I determine the current server load? Do I need to use JMX here to get the cpu time, or is there another way to determine that or something similar?
I basically want to have background jobs run only when the server is idle. I will use Quartz to fire the job every 30 minutes, check the server load then proceed if it i...
What is the most unorthodox way to improve the performance of C code? This is no-holds-barred! Everything goes including changing loop structures to gotos, hardcoding anything and everything, using case statements in bizarre ways etc. Don't worry at all about maintainability, readability etc.
p.s. This is practical... and I'm well awa...
Hi,
My requirement is to upload 5000 images to WAMP server from AIR client.
I am using URLRequest to upload the images.
The size of each image is about 285 KB.
Able to only upload about 300 images only. The server becomes unresponsive and the client stops uploading.
This is urgently required.
Please let me know how do I finetune for per...
How to achieve droppable events on mouseover of each items instead of binding it to all events at beginning. If you can provide with an example code will be great. I googled but there is no hope or solution for the same.
...
I've the two following queries:
declare @UserId as int
set @UserId = 1
-- Query #1: Sub-query
SELECT
u.[Id] ,
u.[Name] ,
u.[OrgId] AS Organization,
(SELECT o.[Name] FROM Org o WHERE o.Id = u.OrgId) As OrganizationName,
[UserRoleId] AS UserRole,
[UserCode] AS UserCode,
[EmailAddress] As EmailAddress,
(SE...
Setup: ASP.net 3.5, Linq-to-Sql. Separate Web and DB servers (each 8-core, 8GB RAM). 4 databases. I am running an insert operation with a few million records into DB4 (using Linq-to-Sql for now, though I might switch to SqlBulkCopy). Logging shows that records are being put in consistently at a rate of 600-700 per second (I am running Da...
We have a file based batch system which runs for 2 hours and handles 2-3 million records. The current process uses shell scripts, sql to do this. (We transform the data, stage it and then do the updates/inserts/valuation)
Can someone tell me about the performance/volume metrics of using a EMS/ESB with java to do the above tasks?
We are ...
Hi there,
What will be faster:
Generate a thumbnail then write the stream to the Http response using an Http Handler.
Generate a thumbnail in a http module on one of the earliest events and let IIS handle the rest of the request.
Thanks,
Ash.
...
I am having massive performance problems on a site running two versions of the same CMS using PHP sessions. A page will take 5-6 seconds to load on one computer, and 300ms on the other.
I'm fairly sure the problem is located in session handling. I am already using different session_name()s and cookie paths for the different CMSs, to no ...
I've noticed many times where some php scripts exit. It seems to me that this will force an exit of the httpd/apache child (of course another will be started if required for the next request).
But in the CMS, that next request will require the entire init.php initialization, and of course just cleaning up and starting php in the first p...
I have a table with 30 columns and about 3.4 million records. Is it reasonable for SELECT * FROM [Table]; to take 8 to 12 minutes to return all 3.4 million results?
If not, where's a good place/resource to begin diagnosing my problem?
...
I was wondering what the performance implications are of using std::time(0) to seed random number generators. I assume that it's a system call (if not please correct me), which generally isn't the best option regarding performance. Assuming std::time(0) is used many times throughout a program, will there be severe performance implication...
Hi
I am measuring time taken by my process using
QueryPerformanceCounter and QueryPerformanceFrequency. It works fine.
As my system is a single processor based system. So many process sharing it.Is it possible to measure CPU time allotted to my process. SO that i can measure absolute time taken.
Platform : Windows
Language : C++
...
I have a SVN server instance set up on my desktop for the purposes of demonstrating the many benefits of SVN/TortoiseSVN.
Performance has today degrading significantly however when performing actions such as viewing the logs etc. This isn't ideal for a demonstration, given that a "Show Log" operation now takes approx 5seconds, whereas ...
I was wondering if there are any general guidelines for when to use regex VS "string".contains("anotherString") and/or other String API calls?
While above given decision for .contains() is trivial (why bother with regex if you can do this in a single call), real life brings more complex choices to make. For example, is it better to do t...
We are planning to port a big part of our Digital Signal Processing routines from hardware-specific chips to the common desktop CPU architecture like Quad-Core or so. I am trying to estimate the limits of such architecture for a program build with GCC. I am mostly interested in a high SDRAM-CPU bandwidth [Gb/sec] and in a high number of ...
RichCopy, a better-than-robocopy-with-GUI tool from Microsoft, seems to be the current tool of choice for copying files. One of it's main features, hightlighted in the TechNet article presenting the tool, is that it copies multiple files in parallel. In its default setting, three files are copied simultaneously, which you can see nicely ...