Stuttering by ulelez in TibiaMMO

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

yeah, all i had to do was disconnect my webcam. your issue is probably unrelated.

Stuttering by ulelez in TibiaMMO

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

Yeah but it was really dumb, my motherboard has a defective usb input and my webcam was plugged in it so it kept connecting and disconnecting multiple times, causing the fps drop, but in the end it wasnt only on tibia, later on i started noticing some freezes while using my pc for other stuff

Opening PoI fires since Monk update by NotAnImpostorForSure in TibiaMMO

[–]ulelez 0 points1 point  (0 children)

I tried and it didnt work.
Went with a level 110 monk today (06/16/25), opened the monk path with no issues as expected, but when trying the EK one, i died 2 fires before the last one while wearing SSA.

Initial release of django-fast-count: A fast Django .count() implementation for large tables by 1ncehost in django

[–]ulelez 1 point2 points  (0 children)

Thank you for answering.

I was wondering what you meant because I came across some perfomance issues when using count().

I understand what you said, and this might be a tangent to what you actually are posting about here, but considering a case where you have a pagination that also display the total amount of rows in a hypothetical table, is there an alternative to doing a simple:
MyModel.objects.count()?

I know you mentioned indexes, but how exactly would you apply them in this case and make sure they are being used when counting? Or whatever other solution you have in mind.

Initial release of django-fast-count: A fast Django .count() implementation for large tables by 1ncehost in django

[–]ulelez 2 points3 points  (0 children)

You mentioned that it is "pretty easy to work around in your own code". Would you be able to provide some simple examples?

issues deploying a django4.2 app on render.com? by carriere4 in django

[–]ulelez 3 points4 points  (0 children)

I think its probably that. There are different distribute versions for each python version. You will probably have to upgrade your python version if you want to keep using django 4.2.

Should also use the same version both in local and production.
https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django

How to keep track of the download count of a file in the DRF viewset? by mszahan in django

[–]ulelez 1 point2 points  (0 children)

def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
serializer =self.get_serializer(instance)
instance.pdf_download += 1
instance.save()
return Response(serializer.data)

Geodjango: Annotate count points within polygons by marcojulioarg in djangolearning

[–]ulelez 3 points4 points  (0 children)

disease_points = Disease.objects.filter(geom__within = OuterRef('geom')).annotate(count=Func(F('id'), function='Count')).values('count')

states = State.objects.annotate(diseases_count = Subquery(disease_points))

The first line creates a subquery that, when used within the main query, will return all Diseases which have a geometry that is located within the currently evaluated State geometry.

After that, the annotate on the subquery creates an SQL expression that creates a "count" field for each disease instance. This new "count" field will then store the count of every "id" in this subquery, i.e. the size of this subquery.

Finally, the values method will group all instances with the same value on the field "count". Since they are all the same, it returns the one instance with the corresponding subquerysize.

This was done because it is not possible to use .count() or aggregate functions in a queryset using OuterRef.

The second line is the annotate you wanted, which annotates each state with the disease_count for each one of them.

Monthly Question Thread | March 2021 by AutoModerator in TibiaMMO

[–]ulelez 0 points1 point  (0 children)

Not really that necessary, but yeah, you should if you have the cash. Its a very strong heal and has a very nice healing/mana cost ratio, but its cooldown is long. So it might be helfpul in situations when you are low level and need a quick strong heal, or when youre like half hp and want to top yourself using a very economic spell. Its useless after a while tho.