@thedevs · Post #1306 · 25.11.2018 г., 10:40
An annotated Webpack 4 config for frontend web development. #article#tutorial#webpack @thedevs https://kutt.it/nYC5Yl
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #32 · 7 фев.
Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks
Пребарај: #webpack
@thedevs · Post #1306 · 25.11.2018 г., 10:40
An annotated Webpack 4 config for frontend web development. #article#tutorial#webpack @thedevs https://kutt.it/nYC5Yl
@djangoproject · Post #479 · 30.10.2017 г., 13:56
http://owaislone.org/blog/webpack-plus-reactjs-and-django/ Using #Webpack transparently with #Django + hot reloading #React components as a bonus
@djangoproject · Post #392 · 27.07.2017 г., 18:20
http://geezhawk.github.io/using-react-with-django-rest-framework Using #React with #Django, with a little help from #Webpack.
@thedevs · Post #1713 · 09.04.2020 г., 16:18
Create App, front-end build config generator. #tools#js#webpack#parcel @thedevs https://kutt.it/SVM7Sl
@djangoproject · Post #235 · 18.01.2017 г., 17:27
http://www.aparat.com/v/Cjarf Happy Asset Deployments With Webpack & Django by Scott Burns Webpack What is it? What does it do? Source transformations Output Why #Djangos collectstatic is not up to the job? Must run after #deployment Doesn't do all the things Slow Integration on both sides Webpack bundle tracker to output build stats Django #Webpack bundle loader to read those files How to render links in templates.
Hashtags
@yinghexiaozu · Post #733 · 28.12.2020 г., 11:23
1️⃣Ronen Amiel - Build Your Own Webpack:一个 40 分钟的视频,手把手教你写一个 Webpack 打包器,让你深刻理解 Webpack 的工作原理。#Webpack#编程 2️⃣每个程序员都应该挑战的项目:作者列举了几个有点难度的小项目,包括文字编辑器、迷你操作系统、2D 游戏、编译器、电子表格软件、游戏模拟器等,做这些小项目对于提高编程水平有很大的帮助。最近,该博客主出了第二个系列。#编程#挑战 3️⃣GTD 时间管理法则:如果你不太会用 Todo 应用来管理自己的时间,不妨看看这篇详细的博客。#GTD#Todo 4️⃣译文|深度解读 Apple ProRAW 功能:如题,很详细的一篇文章。#Apple#ProRAW 5️⃣ “努力就会成功”:努力只是成功的必要条件,不是充要条件,并且要在关键的地方努力,而不是无脑地努力。#努力#成功#思考 Automatically sent by Hardcore Bot v0.9.2
@githubtrending · Post #15034 · 07.08.2025 г., 11:30
#javascript#antd#music#music_player#nodejs#react#react_router#redux#webapp#webpack Copper Bell is a free website app focused on listening to music. It offers many songs and has a simple, clean design that makes it easy to find and play your favorite music. You can search for songs, make playlists, read scrolling lyrics, save songs, and create your own song lists. It does not have live broadcasts, social features, or ads, so there are no distractions and you get a pure music experience. You can use it on any modern web browser without installing anything. It works on many devices, including tablets. This way, you can enjoy music, manage your songs, and discover new tunes easily anytime and anywhere. https://github.com/enzeberg/tonzhon-music