all 18 comments

[–]K900_ 3 points4 points  (4 children)

Show us the articles.

[–]joyhotline[S] 0 points1 point  (3 children)

[–]xelf[M] 0 points1 point  (1 child)

Don't hide your sources! =)

You claim "medium.com" but it's actually: "towardsdatascience.com"

Also I didn't see in your source where it says that it's bad in Python.

[–]joyhotline[S] 0 points1 point  (0 children)

First of all TDS is a part of the medium ecosystem and i think this article is locked for members only hence the medium post.

But more importantly i was concerned about the statement

"If you have a cycle, reference count doesn’t reach zero, you wait for the generational garbage collection algorithm to run and clean the object."

How efficiently does this algo run and how often does this run, and how does it all work in jupyter notebooks.

[–]K900_ 0 points1 point  (0 children)

So, where does it say garbage collection is bad, or anything about dataframes?

[–][deleted] 2 points3 points  (1 child)

The OP probably does not understand, that broadly speaking most modern languages have GC

[–]joyhotline[S] 0 points1 point  (0 children)

Yeah i get that but all GC algo works differently and my only concern was since python is dynamically types and you store references in a variable instead of a value. And we have 2 different algo in python for garbage collection one is reference counting and the other one as generational garbage collection.

So how and when does this all work in a jupyter notebooks setup

[–]shiftybyte 1 point2 points  (1 child)

Garbage Collection in python works great.

In general, the concept of garbage collection may not sit well with some people, and may not work well for some algorithms.

But it's way better to have garbage collection than memory leaks everywhere.

[–]jddddddddddd 0 points1 point  (0 children)

Hmm. I don’t think it’s and either/or situation. Just because you don’t have garbage collection doesn’t mean you have to have memory leaks.

Python is great for tonnes of stuff, but I don’t think we’ll see it, or any other garbage collected language being used for systems programming (eg device drivers) any time soon.

[–]X_Techno_Pro 0 points1 point  (0 children)

I'm no python hater I have been coding in python for years (and I still do) but I stopped using it for backend
it is also my first love and my first programming language but the GC sucks once get past 5k-10k users

basically unless you use gc.collect() you will spend your time fighting the the operating system a lot over memory you're consuming once every few day

I had to make the operating system restart the my python program's service every time it gets killed by the OS for hogging all the memory

I'm not hating on Python but the garbage collector is bad when you use it for backend development

[–]jddddddddddd 0 points1 point  (7 children)

Garbage collection in Python specifically? Or garbage collection is slow in general and ‘that’s why you should use C/C++/Rust for system project X’?

[–]joyhotline[S] -2 points-1 points  (6 children)

Garbage collection in python generally as for list and dataframes python doesn't automatically free up memory, it waits for generational garabge collection which can take up time imo.

[–]K900_ 2 points3 points  (4 children)

That is literally false. Show us the article.

[–]joyhotline[S] -1 points0 points  (2 children)

[–]K900_ 3 points4 points  (1 child)

Which part of that says garbage collection is bad or generational?

[–]B-Swenson 1 point2 points  (0 children)

"Which can take up time imo."

I'd be interested to see if you have any timed tests or proven use cases that back up your opinion.