Comments (11)
Please describe, how do you get those numbers: are they averages, do you use cache, was it a "cold" start, was it a full-menu or partial rendering, do you use access rights checks, Django version.
It might have been expected for recursive template inclusions (what sitetree does), yet your tree is not so big, and far from being deeply nested.
from django-sitetree.
using ab on home page, they are average (на глаз после 10ка прогонов :)
yes, i do use cache (memcached)
i dont count cold start
it is a full menu
no acces rights
django 1.4 latest trunk (btw, the same with 1.3.1)
from django-sitetree.
I'd be glad to see the dump of that tree, if it's not a secret %) so that we can try to cope with the issue.
from django-sitetree.
http://ubuntuone.com/22Vccc0HXLr29wBRZXarhA
from django-sitetree.
I cannot achieve your numbers with {% sitetree_menu from "main" include "trunk" %}
on Django dev server. Do you use custom template or different tag instruction? What web-server software do you use?
Please benchmark the following template:
{% load sitetree %}
{% sitetree_menu from "main" include "trunk" %}
from django-sitetree.
~300 ms (DEBUG* = False, manage.py runserver)
code for view
class Main(TemplateView):
template_name = 'imxo.html'
imxo.html
{% load sitetree %}
<html>
<head></head>
<body>{% sitetree_menu from "main" include "trunk" %}</body>
</html>
vs
{% sitetree_menu from "header" include "trunk" %}
~15 ms
from django-sitetree.
I don't know much about the implementation details, but maybe https://github.com/django-mptt/django-mptt/ would help? It could also simplify the codebase.
from django-sitetree.
This issue cannot be solved by mptt. Sitetree operates a full tree structure in memory, so mptt could not simplify sitretree's codebase (it is simple enought already %)), eventually adding a dependency.
This issue is about semi-idle tree traversing cycles on each tree level, and that is what should be fixed/optimized.
from django-sitetree.
Ah, ok :)
from django-sitetree.
@vosi With 1.0. template variable in URL feature will be removed, that should speed up sitetree a little. Other speed impovements yet to go %)
from django-sitetree.
Notes on performance in documentation seems the appropriate solution for now.
I should add some. Feel free to reopen, if they won't fit your case.
from django-sitetree.
Related Issues (20)
- Dynamic Trees - missing something? HOT 6
- Finer add permission check for displaying the "Add site tree Item" button HOT 3
- Incorporate one dynamic tree into another HOT 2
- How to pass the data models to a menu template ? HOT 4
- Menu Components only appear when the current page HOT 5
- Django 3.1 compatibility HOT 2
- Tests are missing from the sdist HOT 1
- Matching this when multiple URL matches fails HOT 2
- Tree items not displayed in menu if url contains certain special characters HOT 4
- Query the AppConfig directly for its module name HOT 4
- NoReverseMatch on custom models HOT 5
- SiteTree class not returning current item HOT 1
- Sitetreedump with "tree" arguments don't work correctly HOT 1
- compose_dynamic_tree with access_by_perms called in `config.ready` results in database errors HOT 3
- Allow HTML in title_resolved (to allow font-awesome icons) HOT 4
- When changing DEFAULT_AUTO_FIELD setting there are pending migrations
- Building and using a dynamic menu HOT 2
- Dynamic tree items: allow custom attribute binding in item() HOT 1
- Dynamic tree items: simplified access check
- Mapping nested entities to bread crumbs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-sitetree.