Search Results

Search found 40 results on 2 pages for 'alois mahdal'.

Page 2/2 | < Previous Page | 1 2 

  • Profiling Startup Of VS2012 &ndash; dotTrace Profiler

    - by Alois Kraus
    Jetbrains which is famous for the Resharper tool has also a profiler in its portfolio. I downloaded dotTrace 5.2 Professional (569€+VAT) to check how far I can profile the startup of VS2012. The most interesting startup option is “.NET Process”. With that you can profile the next started .NET process which is very useful if you want to profile an application which is not started by you.     I did select Tracing as and Wall time to get similar options across all profilers. For some reason the attach option did not work with .NET 4.5 on my home machine. But I am sure that it did work with .NET 4.0 some time ago. Since we are profiling devenv.exe we can also select “Standalone Application” and start it from the profiler. The startup time of VS does increase about a factor 3 but that is ok. You get mainly three windows to work with. The first one shows the threads where you can drill down thread wise where most time is spent. I The next window is the call tree which does merge all threads together in a similar view. The last and most useful view in my opinion is the Plain List window which is nearly the same as the Method Grid in Ants Profiler. But this time we do get when I enable the Show system functions checkbox not a 150 but 19407 methods to choose from! I really tried with Ants Profiler to find something about out how VS does work but look how much we were missing! When I double click on a method I do get in the lower pane the called methods and their respective timings. This is something really useful and I can nicely drill down to the most important stuff. The measured time seems to be Wall Clock time which is a good thing to see where my time is really spent. You can also use Sampling as profiling method but this does give you much less information. Except for getting a first idea where to look first this profiling mode is not very useful to understand how you system does interact.   The options have a good list of presets to hide by default many method and gray them out to concentrate on your code. It does not filter anything out if you enable Show system functions. By default methods from these assemblies are hidden or if the checkbox is checked grayed out. All in all JetBrains has made a nice profiler which does show great detail and it has nice drill down capabilities. The only thing is that I do not trust its measured timings. I did fall several times into the trap with this one to optimize at places which were already fast but the profiler did show high times in these methods. After measuring with Tracing I was certain that the measured times were greatly exaggerated. Especially when IO is involved it seems to have a hard time to subtract its own overhead. What I did miss most was the possibility to profile not only the next started process but to be able to select a process by name and perhaps a count to profile the next n processes of this name. Next: YourKit

    Read the article

  • Different Not Automatically Implies Better

    - by Alois Kraus
    Originally posted on: http://geekswithblogs.net/akraus1/archive/2013/11/05/154556.aspxRecently I was digging deeper why some WCF hosted workflow application did consume quite a lot of memory although it did basically only load a xaml workflow. The first tool of choice is Process Explorer or even better Process Hacker (has more options and the best feature copy&paste does work). The three most important numbers of a process with regards to memory are Working Set, Private Working Set and Private Bytes. Working set is the currently consumed physical memory (parts can be shared between processes e.g. loaded dlls which are read only) Private Working Set is the physical memory needed by this process which is not shareable Private Bytes is the number of non shareable which is only visible in the current process (e.g. all new, malloc, VirtualAlloc calls do create private bytes) When you have a bigger workflow it can consume under 64 bit easily 500MB for a 1-2 MB xaml file. This does not look very scalable. Under 64 bit the issue is excessive private bytes consumption and not the managed heap. The picture is quite different for 32 bit which looks a bit strange but it seems that the hosted VB compiler is a lot less memory hungry under 32 bit. I did try to repro the issue with a medium sized xaml file (400KB) which does contain 1000 variables and 1000 if which can be represented by C# code like this: string Var1; string Var2; ... string Var1000; if (!String.IsNullOrEmpty(Var1) ) { Console.WriteLine(“Var1”); } if (!String.IsNullOrEmpty(Var2) ) { Console.WriteLine(“Var2”); } ....   Since WF is based on VB.NET expressions you are bound to the hosted VB.NET compiler which does result in (x64) 140 MB of private bytes which is ca. 140 KB for each if clause which is quite a lot if you think about the actually present functionality. But there is hope. .NET 4.5 does allow now C# expressions for WF which is a major step forward for all C# lovers. I did create some simple patcher to “cross compile” my xaml to C# expressions. Lets look at the result: C# Expressions VB Expressions x86 x86 On my home machine I have only 32 bit which gives you quite exactly half of the memory consumption under 64 bit. C# expressions are 10 times more memory hungry than VB.NET expressions! I wanted to do more with less memory but instead it did consume a magnitude more memory. That is surprising to say the least. The workflow does initialize in about the same time under x64 and x86 where the VB code does it in 2s whereas the C# version needs 18s. Also nearly ten times slower. That is a too high price to pay for any bigger sized xaml workflow to convert from VB.NET to C# expressions. If I do reduce the number of expressions to 500 then it does need 400MB which is about half of the memory. It seems that the cost per if does rise linear with the number of total expressions in a xaml workflow.  Expression Language Cost per IF Startup Time C# 1000 Ifs x64 1,5 MB 18s C# 500 Ifs x64 750 KB 9s VB 1000 Ifs x64 140 KB 2s VB 500 Ifs x64 70 KB 1s Now we can directly compare two MS implementations. It is clear that the VB.NET compiler uses the same underlying structure but it has much higher offset compared to the highly inefficient C# expression compiler. I have filed a connect bug here with a harsher wording about recent advances in memory consumption. The funniest thing is that one MS employee did give an Azure AppFabric demo around early 2011 which was so slow that he needed to investigate with xperf. He was after startup time and the call stacks with regards to VB.NET expression compilation were remarkably similar. In fact I only found this post by googling for parts of my call stacks. … “C# expressions will be coming soon to WF, and that will have different performance characteristics than VB” … What did he know Jan 2011 what I did no know until today? ;-). He knew that C# expression will come but that they will not be automatically have better footprint. It is about time to fix that. In its current state C# expressions are not usable for bigger workflows. That also explains the headline for today. You can cheat startup time by prestarting workflows so that the demo looks nice and snappy but it does hurt scalability a lot since you do need much more memory than necessary. I did find the stacks by enabling virtual allocation tracking within XPerf which is still the best tool out there. But first you need to look at your process to check where the memory is hiding: For the C# Expression compiler you do not need xperf. You can directly dump the managed heap and check with a profiler of your choice. But if the allocations are happening on the Private Data ( VirtualAlloc ) you can find it with xperf. There is a nice video on channel 9 explaining VirtualAlloc tracking it in greater detail. If your data allocations are on the Heap it does mean that the C/C++ runtime did create a heap for you where all malloc, new calls do allocate from it. You can enable heap tracing with xperf and full call stack support as well which is doable via xperf like it is shown also on channel 9. Or you can use WPRUI directly: To make “Heap Usage” it work you need to set for your executable the tracing flags (before you start it). For example devenv.exe HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\devenv.exe DWORD TracingFlags 1 Do not forget to disable it after you did complete profiling the process or it will impact the startup time quite a lot. You can with xperf attach directly to a running process and collect heap allocation information from a gone wild process. Very handy if you need to find out what a process was doing which has arrived in a funny state. “VirtualAlloc usage” does work without explicitly enabling stuff for a specific process and is always on machine wide. I had issues on my Windows 7 machines with the call stack collection and the latest Windows 8.1 Performance Toolkit. I was told that WPA from Windows 8.0 should work fine but I do not want to downgrade.

    Read the article

  • Profiling Startup Of VS2012 &ndash; JustTrace Profiler

    - by Alois Kraus
    JustTrace is made by Telerik which is mainly known for its collection of UI controls. The current version (2012.3.1127.0) does include a performance and memory profiler which does cost 614€ and is currently with a special offer for 306€ on sale. It does include one year of free upgrades. The uneven € numbers are calculated from the 799€ and 50% dicsount price. The UI is already in Metro style and simple to use. Multi process, attach, method recording filter are not supported. It looks like JustTrace is like Ants a Just My Code profiler. For stuff where you do not have the pdbs or you want to dig deeper into the BCL code you will not get far. After getting the profile data you get in the All Methods grid a plain list with hit count and own time. The method list for all methods is also suspiciously short which is a clear sign that you will not get far during the analysis of foreign code. But at least there is also a memory profiler included. For this I have to choose in the first window for Profiling Type “Memory Profiler” to check the memory consumption of VS.  There are some interesting number to see but I do really miss from YourKit the thread stack window. How am I supposed to get a clue when much memory is allocated and the CPU consumption is high in which places I should look? The Snapshot summary gives a rough overview which is ok for a first impression. Next is Assemblies? This gives you a list of all loaded assemblies. Not terribly useful.   The By Type view gives you exactly what it is supposed to do. You have to keep in mind that this list is filtered by the types you did check in the Assemblies list. The By Type instance list does only show types from assemblies which do not originate from Microsoft. By default mscorlib and System are not checked. That is the reason why for the first time my By Type window looked like The idea behind this feature is to show only your instances because you are ultimately responsible for the overall memory consumption. I am not sure if I do like this feature because by default it does hide too much. I do want to see at least how many strings and arrays are allocated. A simple namespace filter would also do it in my opinion. Now you can examine all string instances and look who in the object graph does keep a reference on them. That is nice but YourKit has the big plus that you can also look into the string contents.  I am also not sure how in the graph cycles are visualized and what will happen if you have thousands of objects referencing you. That's pretty much it about JustTrace. It can help the average developer to pinpoint performance and memory issues by just looking at his own code and instances. Showing them more will not help them because the sheer amount of information will overwhelm them. And you need to have a pretty good understanding how the GC and the CLR does work. When you have a performance issue at a customer machine it is sometimes very helpful to be able a bring a profiler onto the machine (no pdbs, …) and to get a full snapshot of all processes which are in the problematic use case involved. For these more advanced use cased JustTrace is certainly the wrong tool. Next: SpeedTrace

    Read the article

  • Using mod_rewrite to mask /cgi-bin/abc as /def

    - by Alois Mahdal
    I have a seemingly easy task, but somehow I just can't get it to work: Some interesting lines from my httpd.conf: ... DocumentRoot "D:/opt/apache/htdocs" ... ScriptAlias /cgi-bin/ "D:/opt/apache/cgi-bin/" ... <Directory "D:/opt/apache/htdocs"> Options Indexes FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> <Directory "D:/opt/apache/cgi-bin/"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> (I know it's dumb but it's only a testing machine :D.) Now, I have d:\opt\apache\cgi-bin\expired.pl and I expect GET /licensecheck.php?code=123456. And I wish to fake client into thinking it speaks with /licensecheck.php, but actually return data by \expired.pl. What I tried was setting following at the end of http.conf: RewriteEngine on RewriteRule ^/licensecheck.php$ /cgi-bin/expired.pl [T=application/x-httpd-cgi,L] ...but it keeps 404-ing me, looking for cgi-bin directory (not cgi-bin\expired.pl) in my DocumentRoot! [error] [client 127.0.0.1] script not found or unable to stat: D:/opt/apache/htdocs/cgi-bin /cgi-bin/expired.pl and all other scripts in /cgi-bin/ work as expected, Only way I could make it work was actually putting the \expired.pl to DocumentRoot, but I don't want this, I want my cgi-bin neatly separated :)

    Read the article

  • Handling UTF-8 with BOM in HTTP

    - by Alois Mahdal
    Say I have a script which at some point serves a plain text file as a content (right after "\n\n"). These files are provided by users, but I can expect they will be UTF-8. So I hard-wire Content-Type: text/plain; charset=UTF-8. But while I can teach users to save everything in UTF-8, I can't be very sure that the files will be without BOM ("\xEE\xBB\xBF"), as at least on Windows, this is not very clearly distinguished in common plain text editors and not every one of them uses the same default. So what about these files created on Windows, where they may/may not start with BOM? Should/will server or UA get rid of this debris for me? Or is it my task to prepare clean UTF-8, i.e. open each file and check whether BOM needs to be removed?

    Read the article

  • Why Wireshark does not recognize this HTTP response?

    - by Alois Mahdal
    I have a trivial CGI script that outputs simple text content. It's written in Perl and using CGI module and it specifies only the most basic headers: print $q->header( -type => 'text/plain', -Content_length => $length, ); print $stuff; There's no apparent issue with functionality, but I'm confused about the fact that Wireshark does not recognize the HTTP response as HTTP--it's marked as TCP. Here is request and response: GET /cgi-bin/memfile/memfile.pl?mbytes=1 HTTP/1.1 Host: 10.6.130.38 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: cs,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive HTTP/1.1 200 OK Date: Thu, 05 Apr 2012 18:52:23 GMT Server: Apache/2.2.15 (Win32) mod_ssl/2.2.15 OpenSSL/0.9.8m Content-length: 1048616 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/plain; charset=ISO-8859-1 XXXXXXXX... And here is the packet overview (Full packet is here on pastebin) No. Time Source srcp Destination dstp Protocol Info tcp.stream abstime 5 0.112749 10.6.130.38 80 10.6.130.53 48072 TCP [TCP segment of a reassembled PDU] 0 20:52:23.228063 Frame 5: 1514 bytes on wire (12112 bits), 1514 bytes captured (12112 bits) Ethernet II, Src: Dell_97:29:ac (00:1e:4f:97:29:ac), Dst: Dell_3b:fe:70 (00:24:e8:3b:fe:70) Internet Protocol Version 4, Src: 10.6.130.38 (10.6.130.38), Dst: 10.6.130.53 (10.6.130.53) Transmission Control Protocol, Src Port: http (80), Dst Port: 48072 (48072), Seq: 1, Ack: 330, Len: 1460 Now when I see this in Wireshark: there's usual TCP handshake then the GET request shown as HTTP with preview then the next packet contains the response, but is not marked as an HTTP response--just a generic "[TCP segment of a reassembled PDU]", and is not caught by "http.response" filter. Can somebody explain why Wireshark does not recognize it? Is there something wrong with the response?

    Read the article

  • Windows XP failing to set theme correctly on auto-login

    - by Alois Mahdal
    On several testing machines we have, when automatic login (as Administrator) is activated, Windows fails to set theme (Display properties - Themes) correctly. Particularly, even if theme is set to "Windows Classic", visually it's obvious that "Windows XP" is applied (the one with blue title bars and red "X" butons). I have only seen this happen when Auto-login is set--we always use Administrator on XP. Even if I log out and back in manually, theme is set correctly. Apart from logging out and in, it's also possible to reset theme in "Display properties". It does not happen in 100% of the cases, but it's way over 50%. Definitely it's often enough to be annoying. I believe this is a bug in Windows XP. I have never encountered it on other Windows versions. Does anybody know how to avoid this issue once forever? (Or can anybody provide explanation, relevant links, etc.?)

    Read the article

  • <VirtualHost fqdn.mydomain.com:80> not recommended?

    - by Alois Mahdal
    In Apache2 documentation thay say that in <VirtualHost *:80>, the * can be replaced by IP or FQDN, but the FQDN is not recommended. Addr can be: The IP address of the virtual host; A fully qualified domain name for the IP address of the virtual host (not recommended); But why is it not recommended? If I have www.mydomain.com and webmail.mydomain.com pointing to the same IP address, why shouldn't I use the names here?

    Read the article

  • Moving windows using keyboard...faster?

    - by Alois Mahdal
    I like using keyboard shortcuts because it's faster as it does not force me to move my hands off the keyboard. In Windows I can use them to move windows around desktop: Press Alt+Space to open common windows menu Press M to choose "Move" command Navigate window position by cursor keys Confirm new position with Enter Additionally, to achieve better accuracy, I can hold Ctrl while navigating. Now the problem is that the normal "step" when moving is about 20px, and my desktop is quite large, so "walking" all the way across takes quite a long time. This kind of defeats the purpose of using keyboard for these tasks. Is it possible to change size of this step so that takes less steps to walk the same distance? (I imagine a hidden setting in Windows registry...?) I tried holding Alt while navigating, but it does not seem to have influence on speed.

    Read the article

  • Moving windows on Windows like on Gnome (Alt+DnD)?

    - by Alois Mahdal
    Is there a hidden setting or an external utility that would enable moving windows on Windows like on GNOME? I'm particularly thinking of moving windows using Alt + Drag and drop (which can be changed to Win + drag and drop). I have machine with Windows (7) and two big monitors at work, and I tend to use multiple smaller windows. Moving them quickly around is essential, so I'm always missing this GNOME feature.

    Read the article

  • Cursor and selection invisible if focus is lost

    - by Alois Mahdal
    "Latest" versions of Excel (I think it's since 2007) have a new added "feature" that if Excel windows loses focus, the cursor becomes invisible. Also coloring of headers is default, so it's impossible to locate cursor and/or selection as soon as I switch to other window. This annoys the hell out of me as it makes Excel almost unusable for most of tasks I need it for: keeping track of test cases while performing testing in another window. obtaining data somewhere else and porting it to Excel (I have never seen such behavior in other applications and can't even think of a justification for it.) Is is possible to turn this behavior off?

    Read the article

  • Sharing a symlinked (`mklink /d`) directory via SMB?

    - by Alois Mahdal
    I have a Windows 7 amd64 box where one directory is shared: local path is d:\drop\ remote path is \\aloism\drop from SMB point of view, Everyone has Read and Write permission ACLs for the folder are set so that all authenticated users have read and write permissions:NT AUTHORITY\Authenticated Users:(OI)(CI)C (which is inherited to all levels below) Now I create a symbolic link within the structure of the directory: D:\drop>mklink /d tools2 tools symbolic link created for tools2 <<===>> tools The problem is that I can't access this new directory from any of the remote machines (a Windows 7 box and a Windows XP box—both behave the same way): C:\>dir \\aloism\drop\tools2\ Volume in drive \\aloism\drop is droot Volume Serial Number is FA73-1897 Directory of \\aloism\drop\tools2 File Not Found How can I make it work? Possibly also for files?

    Read the article

  • Disabling "Sign In " tab on startup

    - by Alois Mahdal
    No matter that in Settings → Basics → On startup, I have selected Open the home page Home page is set to my internal address Chrome still opens with two tabs: my Home page and a Sign in tab (in foreground!). How do I disable this Sign in thing? I do not ever want to use it. The version I'm using is Chrome 18.0.1025.168. (For purposes of testing, I'm intentionally using older version.)

    Read the article

  • Server sends json data correctly. Client parses it wrong

    - by alois.wirkes
    I have a PHP code that generates a JSON string to send to my Android app. This part works. The problem is when my app captures that string and try to convert it into a JSONArray object. The main idea is to store that data inside a SQLite database. Here's the code that captures the JSON string: public void getPostResponse(){ try{ br = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8); sb = new StringBuilder(); line = null; while((line = br.readLine()) != null){ sb.append(line+"\n"); } is.close(); result = sb.toString(); Log.e("getPostResponse","result= "+sb.toString()); }catch(Exception e){ Log.e("log_tag","Error converting result "+e.toString()); } } And this is the result in the LogCat: 10-11 16:27:01.171: E/getPostResponse(9155): result= [{ "establecimientos":[]},{ "rutas":[]},{ "formularios":[]},{ "clientes":[]},{ "mediciones":[]}] This is why I think there's an error, the result variable should contain the whole JSON string and it doesn't. Any ideas? Variables br, sb, line and result are declared globally. JSON sent from server is already a JSONArray (starts with '[' and ends with ']'), is this what's causing the problem?

    Read the article

  • Firefox: how to apply XSLT from plugin to opened XML document? (how to replace document with another

    - by aloispaulin
    Hi! I've developed a plug-in for Firefox, that can read and manipulate the content of the currently opened document. I would like to apply a XLST to the document in case it is XML. I have no problem to read the XML document and apply a XSLT to it in memory, however, I have no idea of how to replace the existing document with the newly created one. Thus, I see two possible scenarios: a) I replace the document with the result of the transformation b) I apply the XSLT directly to the XML All my attempts to realize one of both possible solutions have failed... Hoping the community can provide help! Many tnx in advance! Alois

    Read the article

< Previous Page | 1 2