Search results for query: *

  1. E

    Answered Regex Split

    Hi Skydiver, thanks. Is the above implementation specific to a particular flavor of .net environment? Under VS2017, I tried the above code in both 4.6.1 and Core 2.1 and they had different compilation errors. Under 4.6.1, the error was around ReadOnlySpan, which says : type or namespace...
  2. E

    Answered Regex Split

    thank you Skydiver. I moved away from Regex and implemented a non-Regex solution and its been tested working ok for many scenarios, with no issues noticed so far. Yes, non-Regex is more readable and is easier to debug. Thanks for the above, your approach looks more robust than mine.
  3. E

    Answered Regex Split

    hi, the regular expression approach used in the first post is withstanding a wide range of scenarios. However, it still is being improved to handle scenarios of escaped text-qualifier appearing as part of data field (as in #11 post) thank you
  4. E

    Answered Regex Split

    thank you. Pete "Maverick" Mitchell|Lieutenant|Pilot /* invalid, reason-1 : assuming quote is the text-qualifier, it is in the middle of data field and it is not escaped. If it really had to be in the middle, it needed an escape character. reason-2 this column and other columns which are...
  5. E

    Answered Regex Split

    Yes, text-qualifiers are always paired. Both below lines are valid representations. "good|morning"|"40"|"50"|"60" "good|morning"|40|50|60 Text-qualifiers are constructed by the upstream. So, their programs will have to choose an appropriate text-qualifier that is expected not to appear as part...
  6. E

    Answered Regex Split

    If a delimiter appears within a text-qualifier , it is not considered a split criterion. " good | morning"|40|50|60 will produce "good | morning" as first array element if | is a delimiter and " is text qualifier. 40, 50, 60 are next array elements. thanks
  7. E

    Answered Regex Split

    thank you for the reply. The program is expected to be versatile to handle any incoming feed that is free to have text-qualifiers and delimiters of their choice. Some feeds may not even have text qualifiers. Of course, all these choices are conveyed to the program as parameters to interpret...
  8. E

    Answered Regex Split

    hi, I am trying to implement a solution to be able to split a line into array of strings, considering two criteria. Firstly- there are certain columns that are text-qualified with multi-character boundaries. Secondly, a multi-character delimiter. The situation may get complex when there are...
  9. E

    Answered scanning DataTable - a performant approach

    many thanks Skydiver. Sorry for the delay in follow up, was trying to redesign and replace DataTable approach with Lists etc, performance of which was no better. Digging further, I could localise the bottleneck to a user library method that is used to construct the new value in line 90 in...
  10. E

    Answered scanning DataTable - a performant approach

    many thanks, taking a look now. thank you once again.
  11. E

    Answered scanning DataTable - a performant approach

    thank you. Yes, these individual DataTables will be merged before being written to filesystem. The list from line 47 will be used as input to a Library async method that updates Redis in a performant batch approach, carrying hundreds of thousand of Redis calls in a fraction of a minute. Each...
  12. E

    Answered scanning DataTable - a performant approach

    hi, Is DataTable a good fit for large scale data processing, of order hundred thousand rows? I have a scenario, prototyped as below, effectively to achieve two requirements, illustrated in if-else. Scenario: There is a DataTable. There is a uni dimensional list/array, of the same count. The...
  13. E

    Debugging a Library's Asynchronous method invocation and its returned value

    thank you, to debug - I had put ReadKey() in the calling method and noticed the phenomenon of control flow. This time, the breakpoints moved correctly. The library method StringGetAsync offers its functionality in an asynchronous manner, so, I need to arrange my calling module accordingly...
  14. E

    Debugging a Library's Asynchronous method invocation and its returned value

    hi, Is there a way to correctly debug an asynchronous interface? I am invoking an Asynchronous library function StringGetAsync that is offered by StackExchange.Redis. It takes an array of string as input and feeds back an array of RedisValue [] which effectively is byte[] type. The below...
  15. E

    Answered multithreading and asynchronous programming together

    hi, As I understand it, multithreading is for getting full potential of machine's processing capacity by splitting cpu-bound workload. And, Asynchronous programming is to get best use of clock-time to carry on independent tasks simultaneously. Am, trying to integrate these two to address...
  16. E

    CPU bound - Context Switching - Slow thread processing

    Sorry and thanks Herman, the last bit had not been tried, yet. Was considering to choose between a couple of options, yet. New to .net world, sorry.
  17. E

    CPU bound - Context Switching - Slow thread processing

    hi, there has been some significant performance gain I noticed with below pipeline approach. List <Task> addTasks = new List<Task>(); for (int i = 0; i < In_memory_DataTable.Rows.Count ; i++ ) { DataRow row = In_memory_DataTable.Rows[i]; Task<bool> addAsync =...
  18. E

    CPU bound - Context Switching - Slow thread processing

    thanks Skydiver. Console.Writeln are now removed and Profiler is being used for performance monitoring. Also, the approach is being upgraded from earlier serial to asynchronous, to address network round trip issues. Update to redis (sorry, better phrased as adding new {key, value} pair) when...
  19. E

    CPU bound - Context Switching - Slow thread processing

    thanks Herman, Sheepings. The code is as follows: IBatch batch = redis.CreateBatch (); var ListofGetTasks = new List <Task<RedisValue>> (); foreach (DataRow row in in_memory_Datatable .Rows) { var readTask = batch.StringGetAsync (row["key"] ); ListofGetTasks.Add (readTask ); }...
  20. E

    CPU bound - Context Switching - Slow thread processing

    thank you, my Code is as below: foreach (DataRow row in ten-thousand-row-DataTable.Rows) // each row is a 2 column temporary structure with {key, value=null} to start with before looping { 1) var value = retrieve key's value from Redis ; 2) if (retrieved value is null) // key doesn't...
Back
Top Bottom