Search Results

Search found 13249 results on 530 pages for 'performance tuning'.

Page 30/530 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Performance of SHA-1 Checksum from Android 2.2 to 2.3 and Higher

    - by sbrichards
    In testing the performance of: package com.srichards.sha; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import java.io.IOException; import java.io.InputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import com.srichards.sha.R; public class SHAHashActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = new TextView(this); String shaVal = this.getString(R.string.sha); long systimeBefore = System.currentTimeMillis(); String result = shaCheck(shaVal); long systimeResult = System.currentTimeMillis() - systimeBefore; tv.setText("\nRunTime: " + systimeResult + "\nHas been modified? | Hash Value: " + result); setContentView(tv); } public String shaCheck(String shaVal){ try{ String resultant = "null"; MessageDigest digest = MessageDigest.getInstance("SHA1"); ZipFile zf = null; try { zf = new ZipFile("/data/app/com.blah.android-1.apk"); // /data/app/com.blah.android-2.apk } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } ZipEntry ze = zf.getEntry("classes.dex"); InputStream file = zf.getInputStream(ze); byte[] dataBytes = new byte[32768]; //65536 32768 int nread = 0; while ((nread = file.read(dataBytes)) != -1) { digest.update(dataBytes, 0, nread); } byte [] rbytes = digest.digest(); StringBuffer sb = new StringBuffer(""); for (int i = 0; i< rbytes.length; i++) { sb.append(Integer.toString((rbytes[i] & 0xff) + 0x100, 16).substring(1)); } if (shaVal.equals(sb.toString())) { resultant = ("\nFalse : " + "\nFound:\n" + sb.toString() + "|" + "\nHave:\n" + shaVal); } else { resultant = ("\nTrue : " + "\nFound:\n" + sb.toString() + "|" + "\nHave:\n" + shaVal); } return resultant; } catch (IOException e) { e.printStackTrace(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return null; } } On a 2.2 Device I get average runtime of ~350ms, while on newer devices I get runtimes of 26-50ms which is substantially lower. I'm keeping in mind these devices are newer and have better hardware but am also wondering if the platform and the implementation affect performance much and if there is anything that could reduce runtimes on 2.2 devices. Note, the classes.dex of the .apk being accessed is roughly 4MB. Thanks!

    Read the article

  • References for better performance of newer JSF specifications

    - by Pentius
    Dear fellows, I'm looking for a reference to cite, which states that JSF 1.2 performs better than JSF 1.1. Or JSF 2.0 over JSF 1.2 respectively. I'm quite sure that I've read something like this before but can't find it anymore. Maybe you can help. Or is this mischief and there are no official statements regarding the performance?

    Read the article

  • SQL server virtual memory usage and perofrmance

    - by user365035
    Hello, I have a very large DB used mostly for analytics. The performance overall is very sluggish. I just noticed that when running the query below, the amount of virtual memory used greatly exceed the amount of physical memory available. Currently, phsycial memory is 10GB (10238 bytes) where as the virtual memory returns significantly more 8388607 bytes. That seems really wrong, but I'm at a bit of a loss on how to proceed. USE [master]; GO select cpu_count , hyperthread_ratio , physical_memory_in_bytes / 1048576 as 'mem_MB' , virtual_memory_in_bytes / 1048576 as 'virtual_mem_MB' , max_workers_count , os_error_mode , os_priority_class from sys.dm_os_sys_info

    Read the article

  • MySQL: Is it faster to use inserts and updates instead of insert on duplicate key update?

    - by Nir
    I have a cron job that updates a large number of rows in a database. Some of the rows are new and therefore inserted and some are updates of existing ones and therefore update. I use insert on duplicate key update for the whole data and get it done in one call. But- I actually know which rows are new and which are updated so I can also do inserts and updates seperately. Will seperating the inserts and updates have advantage in terms of performance? What are the mechanics behind this ? Thanks!

    Read the article

  • OpenCV performance in different languages

    - by h0b0
    I'm doing some prototyping with OpenCV for a hobby project involving processing of real time camera data. I wonder if it is worth the effort to reimplement this in C or C++ when I have it all figured out or if no significant performance boost can be expected. The program basically chains OpenCV functions, so the main part of the work should be done in native code anyway.

    Read the article

  • Temporary intermediate table

    - by user289429
    In our project to generate massive reports in oracle we use some permanent table to hold intermediate results. For example to generate one report we run few queries and populate the table, at the final step we join the intermediate table with huge application tables. These intermediate tables are cleared for next report run. We have few concerns in performance areas. These intermediate tables are transactional and don't have statistics. Is it good idea to join these with application tables which are partitioned and have up to date statistics. We need these results stored in the intermediate tables to be available across requests from UI hence we are not in a position to use oracle provided temporary tables. Any thoughts on what could be done would be appreciated.

    Read the article

  • Retrieving all objects in code upfront for performance reasons

    - by ming yeow
    How do you folks retrieve all objects in code upfront? I figure you can increase performance if you bundle all the model calls together? This makes for a bigger deal, especially if your DB cannot keep everything in memory def hitDBSeperately { get X users ...code get Y users... code get Z users... code } Versus: def hitDBInSingleCall { get X+Y+Z users code for X code for Y... }

    Read the article

  • C vs. C++ for performance in memory allocation

    - by Andrei
    Hi, I am planning to participate in development of a code written in C language for Monte Carlo analysis of complex problems. This codes allocates huge data arrays in memory to speed up its performance, therefore the author of the code has chosen C instead of C++ claiming that one can make faster and more reliable (concerning memory leaks) code with C. Do you agree with that? What would be your choice, if you need to store 4-16 Gb of data arrays in memory during calculation?

    Read the article

  • C++ performance, for versus while

    - by aaa
    hello. In general (or from your experience), is there difference in performance between for and while loops? What if they are doubly/triply nested? Is vectorization (SSE) affected by loop variant in g++ or Intel compilers? Thank you

    Read the article

  • Tracking down data load performance issues in SSIS package

    - by SteveC
    Are there any ways to determine what the differences in databases are that affect a SSIS package load performance ? I've got a package which loads and does various bits of processing on ~100k records on my laptop database in about 5 minutes Try the same package and same data on the test server, which is a reasonable box in both CPU and memory, and it's still running ... about 1 hour so far :-( Checked the package with a small set of data, and it ran through Ok

    Read the article

  • Does variable name length matter for performance C#?

    - by MadBoy
    I've been wondering if using long descriptive variable names in WinForms C# matters for performance? I'm asking this question since in AutoIt v3 (interpreted language) it was brought up that having variables with short names like aa instead of veryLongVariableName is much much faster (when program is bigger then 5 liner). I'm wondering if it's the same in C#?

    Read the article

  • Image size guidelines

    - by user502014
    Hi all, This may well be a little of an open-ended question The site I am working on requires to be optimised for performance. One of the key areas is to optimise the file sizes of the images used upon the site. Unfortunatley these images are being created by employees who do not have the required knowledge for creating images for the web, and it is my job to produce a set of guidelines for them to use. I was wondering whether there was any resource/guidlines/literature regarding typical images file sizes for images of different dimensions - as I would like to include something like this to aid them to ensure their images are being created properly. Any info would be greatly appreciated. Thanks in advance

    Read the article

  • Symmetric Encryption: Performance Questions

    - by cam
    Does the performance of a symmetric encryption algorithm depend on the amount of data being encrypted? Suppose I have about 1000 bytes I need to send over the network rapidly, is it better to encrypt 50 bytes of data 20 times, or 1000 bytes at once? Which will be faster? Does it depend on the algorithm used? If so, what's the highest performing, most secure algorithm for amounts of data under 512 bytes?

    Read the article

  • Performance - FunctionCall vs Event vs Action vs Delegate

    - by hwcverwe
    Currently I am using Microsoft Sync Framework to synchronize databases. I need to gather information per record which is inserted/updated/deleted by Microsoft Sync Framework and do something with this information. The sync speed can go over 50.000 records per minute. So that means my additional code need to be very lightweight otherwise it will be a huge performance penalty. Microsoft Sync Framework raises an SyncProgress event for each record. I am subscribed to that code like this: // Assembly1 SyncProvider.SyncProgress += OnSyncProgress; // .... private void OnSyncProgress(object sender, DbSyncProgressEventArgs e) { switch (args.Stage) { case DbSyncStage.ApplyingInserts: // MethodCall/Delegate/Action<>/EventHandler<> => HandleInsertedRecordInformation // Do something with inserted record info break; case DbSyncStage.ApplyingUpdates: // MethodCall/Delegate/Action<>/EventHandler<> => HandleUpdatedRecordInformation // Do something with updated record info break; case DbSyncStage.ApplyingDeletes: // MethodCall/Delegate/Action<>/EventHandler<> => HandleDeletedRecordInformation // Do something with deleted record info break; } } Somewhere else in another assembly I have three methods: // Assembly2 public class SyncInformation { public void HandleInsertedRecordInformation(...) {...} public void HandleUpdatedRecordInformation(...) {...} public void HandleInsertedRecordInformation(...) {...} } Assembly2 has a reference to Assembly1. So Assembly1 does not know anything about the existence of the SyncInformation class which need to handle the gathered information. So I have the following options to trigger this code: use events and subscribe on it in Assembly2 1.1. EventHandler< 1.2. Action< 1.3. Delegates using dependency injection: public class Assembly2.SyncInformation : Assembly1.ISyncInformation Other? I know the performance depends on: OnSyncProgress switch using a method call, delegate, Action< or EventHandler< Implementation of SyncInformation class I currently don't care about the implementation of the SyncInformation class. I am mainly focused on the OnSyncProgress method and how to call the SyncInformation methods. So my questions are: What is the most efficient approach? What is the most in-efficient approach? Is there a better way than using a switch in OnSyncProgress?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >