Re: [go-nuts] Deallocate memory consumption of slice.

2024-08-26 Thread Gowtham Raj
object created as global and not within the for loop is causing any issue -? On Mon, 26 Aug 2024 at 21:48, Marvin Renich wrote: > * Gowtham Raj [240826 11:31]: > > > > > > I have a sample go snippet which pulls 50k rows from source DB and > inserts > > into ta

[go-nuts] Deallocate memory consumption of slice.

2024-08-26 Thread Gowtham Raj
I have a sample go snippet which pulls 50k rows from source DB and inserts into target DB. https://go.dev/play/p/IVANZyVUbkm While doing so I create a empty slice and add operations to it. When the length of slice is > 10K, I do a bulk write to DB. The problem here is this script eats more me

[go-nuts] Slice of interfaces taking up so much memory

2024-08-26 Thread Gowtham Raj
Hello team, MongoDB Go bulk write takes up an slice of interfaces which is slice of operations. *https://go.dev/play/p/2vcHx5EFK5x * While doing so I create a empty slice and add operations to it. When the length of slice is > 10K, I do a bulk write to DB. The problem here is this script eats

Re: [go-nuts] GO routine never exits based on stop condition - unable to find the reason

2022-03-28 Thread Gowtham Raj
Great, thanks! On Mon, 28 Mar 2022 at 12:53, Steven Hartland wrote: > No problem, there's a nice little write up on it stackoverflow > <https://stackoverflow.com/questions/47645808/how-does-select-work-when-multiple-channels-are-involved> > . > > On Mon, 28 Mar 2022 at

Re: [go-nuts] GO routine never exits based on stop condition - unable to find the reason

2022-03-28 Thread Gowtham Raj
no guarantee that the select chooses the done case, so you need > to check in work case as well e.g. > https://go.dev/play/p/zAj_qfO4uMA > > On Mon, 28 Mar 2022 at 16:54, Gowtham Raj wrote: > >> In this example, we have a *worker*. The idea here is simulate clean >> shutdown

[go-nuts] GO routine never exits based on stop condition - unable to find the reason

2022-03-28 Thread Gowtham Raj
In this example, we have a *worker*. The idea here is simulate clean shutdown of all go routines based on a condition. In this case, go routines get spun - based on workers count. Each go routine reads the channel, does some work and sends output to the outputChannel. The main go routine rea

[go-nuts] Thread ID in glog

2019-08-19 Thread Ramya Raj
Hey! In this line , are you planning to change pid to thread ID? I would like to use glogs to display different IDs for each worker thread. Thanks, Ramya -- You received this message because you are subsc

[go-nuts] vgo tooling support

2018-04-06 Thread Raj
vgo is still in proposal state. https://github.com/golang/go/issues/24301. I believe tools start supporting it once it accepted, finish the implementation and released may be as part of Go1.11. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: [ANN] A Go based map reduce system (second attempt)

2016-09-11 Thread Raj
>> However, it is still limited by the fact that Go code can not be sent and executed remotely. I am not sure if this makes the situation better for this particular use case, but I see that David Crawshaw is working on plugin mode for Go. It looks like it will be part of Go1.8. -- You receive

Re: [go-nuts] Speeding up multiple regexp matches

2016-07-28 Thread Raj
But that won't give me list of all matched regexps. No? On Thursday, July 28, 2016 at 12:32:41 AM UTC-7, Tamás Gulácsi wrote: > > Just concatenate them with |. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and st

Re: [go-nuts] Speeding up multiple regexp matches

2016-07-27 Thread Raj
Thank you for excellent suggestions. I will explore and try them. I am wondering is it possible to single NFA/DFA from set of regular expressions (similar to aho-corasick which does for fixed strings) which can determine matched regexps with single pass on the input. Especially if regular expr

[go-nuts] Re: Speeding up multiple regexp matches

2016-07-27 Thread Raj
Is it possible to build an NFA/DFA from a list of regular expressions which can give the desired result i.e. list of regexps which matched the input string? Are there any existing libs for this? Do anybody konwof any existing algos for it, which I can use to implement it? -- You received this

[go-nuts] Re: Speeding up multiple regexp matches

2016-07-27 Thread Raj
- There are more than 10,000 regexps. - I need to do this task on ~ 800 million strings having max length 1KB each, and this number growing daily. - Currently regular expressions are simple. It's actually what MS SQL Server like operator supports. i.e. "_%[]^". See https:/

[go-nuts] Speeding up multiple regexp matches

2016-07-27 Thread Raj
Not specific to golang. Incidentally I am using go to develop this particular tool. I have a piece of text that I want to test against a large number of regular expressions, where a different action is taken based on which regexps successfully matched. The naive approach is to loop through each

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
On Friday, July 8, 2016 at 11:16:50 PM UTC+5:30, Konstantin Khomoutov wrote: > > On Fri, 8 Jul 2016 08:15:27 -0700 (PDT) > Raj > wrote: > > > Initially the program giving err driver: bad connection for rows.Err > > (). So I added panic with that error to get the st

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
Lance Taylor wrote: > > On Fri, Jul 8, 2016 at 7:50 AM, Raj > > wrote: > > By the way I am using go1.7 beta2. Same error was appearing with go1.6 > also. > > > > What does those 8 minutes mean in stack trace? > > Those annotations mean that those goroutines ha

[go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
By the way I am using go1.7 beta2. Same error was appearing with go1.6 also. What does those 8 minutes mean in stack trace? On Friday, July 8, 2016 at 8:13:26 PM UTC+5:30, Raj wrote: > > Hi, > > My program which has 10 user gourotines to read tables from a database and > gener

[go-nuts] golang sql driver: bad connection

2016-07-08 Thread Raj
Hi, My program which has 10 user gourotines to read tables from a database and generates some stats. I am using github.com/alexbrainman/odbc to connect SQL Server 2012. I am getting driver: bad connection frequently, but not always. Can somebody help me in debugging this? Sart of the stack t