Skip to content

How to configure it for around 1,00,000 users #60

Open
@Abhi-khandelwal

Description

@Abhi-khandelwal

I have to show realtime leaderboard for 1,00,000 users , so How can I implement it in my Django webapp ,

If I am insert my data through Loop it will take too much time and load , so Can you please tell me what will the best approach for this
Here you can Check my code
Models.py

`class Score(models.Model):
name=models.CharField(max_length=211)
score=models.IntegerField()

def str(self):
return self.name
`

Views.py

def Index(request):
a=Score.objects.all()
highscore_lb=CompetitionRankingLeaderboard('sdfs')
for index in a:
highscore_lb.rank_member(index.name, index.score)
b=highscore_lb.all_leaders()
return render(request,'index.html',{'b':b})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions