openSNP / snpr

The sources of the openSNP website
http://opensnp.org
MIT License
174 stars 46 forks source link

Remove user SNPs tab? #418

Closed philippbayer closed 7 years ago

philippbayer commented 7 years ago

I was thinking about speedups and realised something:

https://opensnp.org/snps/rs12979860

Does anybody even use the user-alleles tab on that page? People are maybe interested in their own allele and the summary stats, but I cannot see a case where you'd like to scroll through 1498 alleles. Can we just remove that tab and ease the load on the server from all the crawling bots?

gedankenstuecke commented 7 years ago

At least one user, Ian, always complains when those stats are not up to date actually, he's using them to look into super rare alleles and to find who has those. Maybe there's a way to make this specific use case easier?

philippbayer commented 7 years ago

We could also put those into a second view, so these wouldn't need to be loaded for every crawler?

gedankenstuecke commented 7 years ago

Isn't the tab already dynamically loaded only when people click on it? Or was this a former try that we didn't end up using? :D

gedankenstuecke commented 7 years ago

Nope, we have the ajax thing for that in place, e.g.

<script type="text/javascript">
  $.ajax({
   url: "/user_snps",
   data: { snp_name: 'i6000038', local_genotype: '' },
   success: function (html) { $("#user-list").append(html); }
   });
</script>
philippbayer commented 7 years ago

Oh wow I totally forgot about that! So this issue is moot then :)

gedankenstuecke commented 7 years ago

Yeah, only thing that might be of interest would be how to get around the ajax loading when robots hit that page? As I think it loads these things now as well?

philippbayer commented 7 years ago

We could use the robots.txt for that? pull out the ajax into a .js file and then

Disallow: /*.js$ ?

gedankenstuecke commented 7 years ago

Not sure if that works, but we could try? :D

tsujigiri commented 7 years ago

Why not Disallow: /user_snps?

gedankenstuecke commented 7 years ago

That sounds even easier 😂